Multiple Parameter on RowSource - Form

pikoy

Registered User.
Local time
Today, 01:18
Joined
Dec 23, 2009
Messages
65
Hello all,

I am trying to add another parameter on string that i have placed on the combo box's row source:
Code:
SELECT Contacts.ID, Contacts.[First Name] & " " & List.[1Name] FROM Lists WHERE Lists.source=[B][U][COLOR=red]'1'[/COLOR][/U][/B] ORDER BY List.[2Name];

Currently, the combo box returns with a list that has a source value thats equal to 1. I want it show a list that contains both 1 and 2 source values.

I have tried "1:2"
<>1,2

Please help. Thank you
 
That would be:

SELECT Contacts.ID, Contacts.[First Name] & " " & List.[1Name] FROM Lists WHERE Lists.[source] In('1', '2') ORDER BY List.[2Name];

But is [source] text? If not, don't use the quotes.

Also, source is a reserved word in Access so you need to put it in brackets and it would be even better if you didn't use that as a field or object name.
 
it worked Thank you.:)
 
You are welcome. :)
 

Users who are viewing this thread

Back
Top Bottom