Connecting Tech Pros Worldwide Help | Site Map

Requery of combobox doesn't show properly

Georges Heinesch
Guest
 
Posts: n/a
#1: Nov 12 '05
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
Mike Storr
Guest
 
Posts: n/a
#2: Nov 12 '05

re: Requery of combobox doesn't show properly


On Wed, 04 Feb 2004 08:36:35 +0100, Georges Heinesch wrote:
[color=blue]
> 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[/color]

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
Closed Thread