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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange issue with drop list based on previous selection

Status
Not open for further replies.

Chummly66

MIS
Feb 19, 2005
106
US
I ran into this and was wondering if someone could shed some light.

I have a parts list table, which has 4 basic columns: Make, Model, Description, and partnumber.

On my form, I have a combo box which I select a Make (cboMake), and a second one that lists the models (cboModels) based on the selection I have in cboMake. Then later on in the form, if I use a part for this particular work order, I click on another combo box (cboPartDesc1) and it lists only the parts based on the previous selections from cboMake and cboModel.

But what I find sometimes is that cboPartDesc1 will show the parts based on the previously saved record, and not the current record I am working on. I can remedy this by clicking on my form's Save button, and then reopen the cboPartDesc1 box, which now shows the proper listing of parts.

I know I must be missing something simple, such as a requery or maybe worse comes to worse, add a OnClick event for cboPartDesc1 combo box to save the record before it lists the parts.

Any advice would be appreciated!

Richard
 
I'm assuming that these combo boxes are all unbound controls. On the AfterUpdate event of the first two combo boxes, you need to have cboPartDescr1.Requery.


HTH

John

When Galileo theorized that Aristotle's view of the Universe contained errors, he was labeled a fool.
It wasn't until he proved it that he was called dangerous.
[wink]
 
Boxhead,

Thanks for the reply. I thought i had tried that before but I actually placed the requery line in the wrong place. Its all working now. Thank you!!

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top