Those Pesky Combo Boxes

wildcat

Registered User.
Local time
Today, 11:08
Joined
Jan 15, 2009
Messages
20
I have a combo box in a form based off of a query - qryUnassignedCampers

This query is an unmatched query to help me find unassigned participants in a program.

I use the following code on my combo box
SELECT qryUnassignedCampers.CamperID, [CamperLast] & ", " & [CamperFirst] AS Camper, qryUnassignedCampers.GenderID
FROM qryUnassignedCampers
WHERE (((qryUnassignedCampers.GenderID)=[Forms]![frmCabins]![GenderCombo]) AND ((qryUnassignedCampers.GradeID)>19))
ORDER BY [CamperLast] & ", " & [CamperFirst];

This allows me to get the unassigned participants of the correct gender and grade.

My problem is that it only shows one gender of participants (male) and will not show the other (female). Any idea why?

Thanks for your help
 
If you llok more closely at your syntax it reads

qryUnassignedCampers.GenderID)=[Forms]![frmCabins]![GenderCombo]

In other words whatever gender you have selected on the form is being passed to the query. A bit obvious I would have thought.
 
That is correct. I want the query to show only the gender that I am working with - based on the current form.
When I work with the first group (males) it works fine, but when I work with the second group (females) it still only shows the males - does not change to the females.

I have looked through the code several times and have tried breaking it down piece by piece - everything works except for when I want the Genders to be changed.
 

Users who are viewing this thread

Back
Top Bottom