Should've explained more, I will have fields like Sales Rep, Country, County, Region - if someone chose a particular sales rep then it would need to just pick the countries, counties and regions they deal with - equally if someone picked a region it would need to show just the reps who deal with that region....if that makes sense.
I may be talking complete and utter b*ll*cks, excuse me if I am - I taught myself Access in the first place and haven't used it for a few months! My brain seems to have found things more useful than access to replace the knowledge with!!
One wasy I thought of a solution is to create a function that cascades from top down for everytime each of the combo boxes are selected. That is you will call the function on the AfterUpdate event of each combo box. This is a start:
Dim isFiltered as Boolean - create this at the Declaration section
Private Country_AfterUpdate(Optional nameOfControl as string)
If SalesRep.ListIndex > - 1 then
Country.Enabled = True
Country.value = SalesRep.Column(0)
isFiltered = True
Else
SalesRep.SetFocus
' Set all the other controls' values to their default value
' Then disable all of them
isFiltered = False
Exit Sub
End if
If Country.ListIndex > - 1 then
County.value = Country.Column(0)
isFiltered = True
Else
If isFiltered = False Then
Country.SetFocus
' Set all the other controls' values (those below country, like county etc) to their default value
' Then disable all of them
End if
End If
' Use the Country code for the rest of them here.
End Sub
I declared the isFiltered boolean variable as a global variable within the scope of the form so that you can check whether any of the boxes had been selected. This is only to start you off, you just need to play around with the code to find a more efficient way of handling it. Like you could disable the control's in the AfterUpdate event instead of the function but let the function handle the cascading.