AfterUpdate Requery

  • Thread starter Thread starter James Bailey
  • Start date Start date
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.
 
You can set a combo box to Null, which should clear any selection:

cbEquipType = Null

Carl Rapson
 
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!
 
Back
Top