I did use
Like "*" & [forms]![frmSTR_ReportsSwitch].[Company]
and this works most of the time.
if i enter a company id of 2 for example in my form criteria,
this retrieves 2 records not one.
It retrieves company id 2 and company id 12 because of the like "*"
Do you have any ideas on getting around this
I want to retrieve all records if no criteria is entered and only the ones
specified if criteria is entered.
Thanks again
dee
--
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com
Like "*" & [forms]![frmSTR_ReportsSwitch].[Company]
This works fantastically most of the time, but not when criteria is
entered
and there is similar data to be retrieved. I have tried something like
IIf(IsNull([forms]![frmSTR_ReportsSwitch].[Company]),Like
"*",[forms]![frmSTR_ReportsSwitch].[Company])
but this doesn't work.
any ideas.
thanks again
dee
--
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com
Use the LIKE and * operators in the criteria of the query.
i.e. LIKE "*" & forms!frmName!controlname
--
HTH,
Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Hi
I have a query that gets it criteria from a form and this is no
problem.
I am wondering how to get the query to retrieve all records if no
criteria
is entered.
thanks in advance
--