refreshing comboboxes

Schmidtty

Registered User.
Local time
Today, 06:44
Joined
Jan 30, 2003
Messages
12
I have been searching this forum for help on refreshing a cascading combo box, and I either get lost or am not finding what I am looking for...So I thought I would just ask............

I have a combo box for regions (combobox1) and then a combo box to find the bankers that are assigned to that region (combobox2). Everything is lovely.

Except I can't go back choose a different region and the subsequent bankers without closing the form. combobox2 stays with the banker choices in first region. I want to "refresh" my choosing ability in combobox1.

I tried a regionid.requery on afterupdate but that prompts me for a macro?!?!?!?!

help.
 
The .Requery is code and you don't put it in the event line (or whatever that line is called) - click on the button (ellipse?) at the end of that line and select Event Procedure. You'll be taken to the code screen with a sub called Private Sub RegionsID_AfterUpdate()

Put the RegionsID.Requery statement in there.

Is RegionsID the name of your combobox? If not then use

WhateverYourComboBoxNameIsHere.Requery
 
should the event procedure go in combobox2 - bankerid? or the initial combobox1 - region?
 
Sorry, when I said Event Procedure, I meant select Code Builder.

The code would be:

BankerID.Requery

and this goes in the AfterUpdate() event of RegionsID.
 

Users who are viewing this thread

Back
Top Bottom