By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,162 Members | 992 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,162 IT Pros & Developers. It's quick & easy.

Requery of combobox doesn't show properly

P: n/a
Hi.

I have a text field (txtTX) and a combobox (cboCB). Both controls are on
2 different subforms (SF1 and SF2) belonging to the main form (MF).

MF -+- SF1 --- txtTX
+- SF2 --- cboCB

txtTX is used to fill cboCB. In other words, SF1 provides the data which
fills cboCB.

I created code (AfterUpdate of SF1) to update cboCB if one of the
records within SF1 changes. Here the code (nothing special!):

Forms!MF!SF2!cboCB.Requery

So far, everything is fine. Now ... as soon as I change the contents od
txtTX and I move to the next record in order to update SF1, I get the
following effect. cboCB is properly updated. But this shows only when I
select the arrow on the right of the cboCB control in order to look at
the items. The text part of the control however doesn't reflect the change.

How is that possible?

TIA

--
Georges
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Wed, 04 Feb 2004 08:36:35 +0100, Georges Heinesch wrote:
Hi.

I have a text field (txtTX) and a combobox (cboCB). Both controls are on
2 different subforms (SF1 and SF2) belonging to the main form (MF).

MF -+- SF1 --- txtTX
+- SF2 --- cboCB

txtTX is used to fill cboCB. In other words, SF1 provides the data which
fills cboCB.

I created code (AfterUpdate of SF1) to update cboCB if one of the
records within SF1 changes. Here the code (nothing special!):

Forms!MF!SF2!cboCB.Requery

So far, everything is fine. Now ... as soon as I change the contents od
txtTX and I move to the next record in order to update SF1, I get the
following effect. cboCB is properly updated. But this shows only when I
select the arrow on the right of the cboCB control in order to look at
the items. The text part of the control however doesn't reflect the change.

How is that possible?

TIA


Requerying a combobox does not reset it's value (what is displayed), it
only resets what is displayed as the possible choices in the list. If you
want the value to change, you'll need to change this on top of the requery
you currently have.

--
Mike Storr
veraccess.com
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.