重新查询组合框无法正常工作 [英] Requery of a combo box not working

查看:58
本文介绍了重新查询组合框无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是理解SQL的新手 - 所以请耐心等待。


frmEchoEnter 上,用户应从中选择一个号码在启用子表单以接收数据条目之前,cboEchoSelect

frmEcho 是列出所有Echo号码的地方。如果没有可供选择的新号码, frmEcho 需要在 frmEchoEnter 处理之前进行更新。


我为 cboEchoSelect 提供了这些SQL。我希望在更新 frmEcho 后列出新号码。但是重新查询不起作用。我必须关闭 frmEchoEnter 并打开它以查看添加的新号码。


我可能需要对 On Double_Click 或 On After_Update


有人可以帮忙吗?谢谢。

I am new at understanding SQL - so please be patient with me.

On frmEchoEnter the user is supposed to select a number from cboEchoSelect before the sub forms are enabled to receive data entry.

frmEcho is where all the Echo number is listed. In the event there are no new number is available to select, frmEcho needs to be updated before frmEchoEnter can be worked on.

I have these SQL for the cboEchoSelect I wanted the new number to be listed once I update frmEcho. But the requery does not work. I must close frmEchoEnter and open it to see the new number that is added.

I probably need some modification to the On Double_Click or On After_Update

Can someone please help? Thanks.

展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号

推荐答案

frmEcho是子表单吗?
Is frmEcho a sub-form?


NeoPa:


编号 frmEcho 基于 tblEcho ,其中包含以下字段


ECHOID

EchoNo

DtSubmitted

DtReceived

frmEchoEnter 是具有3个子表单的主窗体:sfrmApDetails,sfrmPayDetails,sfrmAllocDetails。

cboEchoSelect 是主窗体上的组合框 frmEchoEnter

希望这能回答你的问题。谢谢你的时间。
NeoPa:

No. frmEcho is based on tblEcho which has the following fields

ECHOID
EchoNo
DtSubmitted
DtReceived

frmEchoEnter is the main form which has 3 sub forms: sfrmApDetails, sfrmPayDetails, sfrmAllocDetails.

cboEchoSelect is a combo box on the main form frmEchoEnter.

Hope this answers your questions. Thanks for your time.


忘了。阅读完所有代码后,我可以看到您必须使用的设计以及您的问题。这与任何SQL完全无关。


您的代码在打开表单 frmEcho 后立即调用.Requery( cboEchoSelect_DblClick <的第10行的)。这会立即执行。不是在操作员从中做出任何选择或完成任何工作后, frmEcho


为确保.Requery按预期工作,您应该致电它来自 frmEcho 代码模块(在添加项目时或表单关闭时)。
Forget that. After reading through all the code I can see the design you must be using, as well as your problem. This is entirely unrelated to any SQL though.

Your code calls the .Requery immediately after opening the form frmEcho (Line #10 of cboEchoSelect_DblClick). This executes immediately. Not after the operator has made any selection from, or done any work in, frmEcho.

To ensure the .Requery works as you intend, you should call it from the frmEcho code module (either when an item has been added or when the form is closed).


这篇关于重新查询组合框无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆