Connecting Tech Pros Worldwide Help | Site Map

Requery of combobox doesn't show properly

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 06:54 PM
Georges Heinesch
Guest
 
Posts: n/a
Default Requery of combobox doesn't show properly

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

  #2  
Old November 12th, 2005, 06:59 PM
Mike Storr
Guest
 
Posts: n/a
Default 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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.