Form Combo Box selection returns every combination

Jackson1942

Registered User.
Local time
Today, 17:45
Joined
Dec 22, 2011
Messages
15
My Form1 has 2 Combo Boxes and a Command Button that runs a Query.
Query Criteria:
Like [Forms]![Form1]![Combo0] & “*” or Is Null
Like [Forms]![Form1]![Combo2] & “*” or Is Null

Combo0 entries include:
Faculty
Faculty & Staff
Faculty, Staff & Students

If I select Faculty from Combo0, it displays Faculty; Faculty & Staff; Faculty, Staff & Student entries.

I need the ability to select from either Combo box leaving the other blank.

What do I need to do to limit the results to just Faculty?
 
If I understand your scenario correctly, try:
Code:
Private Sub Combo0_AfterUpdate()
 If Not IsNull(Me.Combo0) Then
  Me.Combo2 = Null
 End If
End Sub
Code:
Private Sub Combo2_AfterUpdate()
 If Not IsNull(Me.Combo2) Then
  Me.Combo0 = Null
 End If
End Sub
Linq ;0)>
 
I believe I'm misleading everyone with the "I need the ability to select from either Combo box leaving the other blank." This is working.

What I need is a way to limit the results of what is returned after selecting Faculty in Combo0. Instead of returning just the Faculty entries, it returns every entry with any combination of Faculty.
 
Well, duh! That's a different thing entirely!

The concept is called "cascading comboboxes" although the exact same thing applies to Listboxes with the MultiSelect Property set to None, and the code is interchangeable. Here are a couple of links with examples:

http://www.fontstuff.com/access/acctut10.htm
http://bytes.com/forum/thread605958.html

If you Google the term along with the "Access" you'll probably get a gazillion hits!

Linq ;0)>
 
Thanks everyone, finally got back to trying and it is now working.
 

Users who are viewing this thread

Back
Top Bottom