I am working on a form that has 2 combo boxes. The first in the first box the user selects a field from a table and then the second box the user selects one of the values in the field.
I need to write a query to get the results of what the user selected. I have something like this:
SELECT [Attendee].[FIRST_NAME], [Attendee].[LAST_NAME], [Attendee].[STREET], [Attendee].[CITY], [Attendee].[State], [Attendee].[ZIP]
FROM Attendee
WHERE
[Attendee].[FORMS]![MyForm].[cmb1x1]=[FORMS]![MyForm].[cmb1x2]
ORDER BY [Attendee].[LAST_NAME];
but of course this is not work. I know
[FORMS]![MyForm].[cmb1x2] part works because if I go
Attendee.Job_DESC = [FORMS]![MyForm].[cmb1x2] then the query works. So how do I get this to work? I hope I explained this clearly enough. Thanks
I need to write a query to get the results of what the user selected. I have something like this:
SELECT [Attendee].[FIRST_NAME], [Attendee].[LAST_NAME], [Attendee].[STREET], [Attendee].[CITY], [Attendee].[State], [Attendee].[ZIP]
FROM Attendee
WHERE
[Attendee].[FORMS]![MyForm].[cmb1x1]=[FORMS]![MyForm].[cmb1x2]
ORDER BY [Attendee].[LAST_NAME];
but of course this is not work. I know
[FORMS]![MyForm].[cmb1x2] part works because if I go
Attendee.Job_DESC = [FORMS]![MyForm].[cmb1x2] then the query works. So how do I get this to work? I hope I explained this clearly enough. Thanks