Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Choose twice in combobox

Status
Not open for further replies.

smitan

Programmer
May 11, 2002
115
DK
Hi, I am working with MsAccess 2000 9.0.6926 SP3.
Some comboboxes on my form have a very peculiar way of reacting, i.e. they do not react at all, THE FIRST TIME.
When choosing the same value again, the afterupdate is fired and the value shown.
It happens every time, no matter how often I choose a value, just choose it twice and there it is.

The number of Me.Controls.Count=231.
The cbo is populated when the tabpage (on which it is located) is choosen for the first time, as part of the query is a variable, which has no value when the form is opened.

Hope somebody has a solution to this funny thing, my users will be very gratefull.

Have a nice day, Smitan
 
When does the variable get a value assigned, and how are you using in your query?

Is it possible that when you select the value the first time, you are generating a requery? Which makes the second slection work?

If so, maybe add a requery command to your tab control's on click event.

ChaZ

 
How are smitan . . . . .

By any chance is the comobobx on a subform on the tab control?

Try moving your code for populating the combobox to the [blue]OnLoad[/blue] event of the form (move it . . . don't just copy it . . . where you currently have the code should be blank).

Calvin.gif
See Ya! . . . . . .
 
I unfortunately added a new thread, let's continue the other one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top