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!

Can you help me correct my requery code

Status
Not open for further replies.

Steven811

Technical User
Joined
Apr 15, 2004
Messages
76
Location
GB
Hi

When I have been through the combo boxes once and made my selection everything is fine. When I go back to the top and start again, the next but one combo doesn't requery as I have planned.

I have tried to make it happen with OnUpdate, OnChange and OnClick without success.

The code that I am using is as follows:

[Private Sub cbo1_AfterUpdate()
Me.cbo2.Requery
Me.cbo2.Locked = Me.cbo2.ListCount < 1
Me.cbo2.Enabled = Me.cbo2.ListCount > 0

Me.cbo3.Requery
Me.cbo3 = ""
Me.cbo3.Locked = Me.cbo3.ListCount < 1
Me.cbo3.Enabled = Me.cbo3.ListCount > 0

Me.cbo4.Requery
Me.cbo4 = ""
Me.cbo4.Locked = Me.cbo4.ListCount < 1
Me.cbo4.Enabled = Me.cbo4.ListCount > 0

End Sub]

The odd thing is that the same code clears the display as it should.

Any assistance would be appreciated.

Steven811
 
What are the RowSource of these combo ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi

They're queries.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top