IIF parameter



Hi! I am trying to write a query that based on a Form's (Salesfrm) Selection
Combo Box(CompanyCombo) the query will provide data.
I am trying to use the IIF statement with out luck (not sure if there is a
better way to do this) .
I need the query to lookup records IF the Selection value = "Company1" then
Like "*40000*" Or Like "*40001*" Or Like "*40002*" Or Like "*40003*" Or Like
"*40060*"
But if selection value = "Company2" then Like "*40030*" Or Like "*40031*"
But if selection value = "All Companies" then Like "*40000*" Or Like
"*40001*" Or Like "*40002*" Or Like "*40003*" Or Like "*40060*" or Like
"*40030*" Or Like "*40031*" (note: I can not use a wild card here because I
do not want to inclue all accounts)
Any ideas are more than welcomed.
Thank you!


.



Relevant Pages

  • RE: Designing Query - Help Please ASAP
    ... Paste the above SQL into a new blank query in SQL view and save it while ... "tmdrake" wrote: ... "Ken Sheridan" wrote: ... If I make a selection in the ProjectID box = then the subform will ...
    (microsoft.public.access.queries)
  • Re: VB-ADO-SQL Server : SQL Server performs logins after some queries
    ... If you have some joins or WHERE clause in your statement, ... Also try to minimize selection of the records using WHERE ... Incase of actual action query, ... >> of queries and I've concluded that in case of an internet conection the ...
    (microsoft.public.vb.database.ado)
  • Re: Selecting Random Records
    ... SET LastMailingDate = Date ... How do you update the random selection query so that the selected field reflects the current day's date? ...
    (microsoft.public.access.queries)
  • Re: IIF parameter
    ... Company 3 uses the same accounts as Company ... Selection Combo Boxthe query will provide data. ... I need the query to lookup records IF the Selection value = "Company1" ...
    (microsoft.public.access.queries)
  • RE: Using an append query with an update query
    ... How to retrieve the selected items in a multiple selection List Box as a ... Using an append query with an update query ...
    (microsoft.public.access.queries)