AfterUpdate Requery

J

James Bailey

I'm having a problem with Requery. I have 7 combo boxes that are cascading.
One gets it's data from the previous one. The first three requery and blank
out the combo boxes if the item that was selected isn't in the new list.
Although the last four do requery and get a new list, they keep the previous
selected text even if it isn't in the new list. I set the Limit To List
option but that didn't have an effect on the last four combo boxes. I posted
the different ways I've tried requerying below. The only one that seems to
remove the data is DoCmd.Requery but only does it for Client, and Contract.

Any help is much appreciated!


Private Sub cbManf_AfterUpdate()
Me("cbEquipType").Requery
End Sub

Private Sub cbVessel_AfterUpdate()
DoCmd.Requery "cbClient"
DoCmd.Requery "cbContract"
DoCmd.Requery "cbManf"
DoCmd.Requery "cbEquipType"
End Sub

Thanks.
 
C

Carl Rapson

You can set a combo box to Null, which should clear any selection:

cbEquipType = Null

Carl Rapson
 
J

James Bailey

At first your solution caused some problems with data getting lost in all of
the records that were displayed by the form but once I set it Data Entry to
"Yes" it worked..

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top