My Assistant
![]() ![]() |
|
|
Jan 11 2011, 11:11 AM
Post
#1
|
|
|
UtterAccess Addict Posts: 148 From: Wales UK |
Hi I have tried to research and play around with different ways to do this but to no avalil. i know it should be easy.
I have a query and a parameter form, the parameter is set to a colume called "status". What I need the criteria to do is return all records that have a null value and omitt any data if if nothing is enterted into the parameter box. If "Tender" or any other critiera is selected then i need it to return those records and omitt the null values. Please help as I have tried for afew hours now. Thansk Stephen |
|
|
|
Jan 11 2011, 11:20 AM
Post
#2
|
|
|
Access Wiki and Forums Moderator Posts: 47,918 From: SoCal, USA |
Hi Stephen,
Would something like this work? ... WHERE Status = Forms!FormName.ControlName OR IsNull(Status) = IsNull(Forms!FormName.ControlName) (untested) Hope that helps... |
|
|
|
Jan 11 2011, 11:36 AM
Post
#3
|
|
|
UtterAccess Addict Posts: 148 From: Wales UK |
Hi
Thanks for getting back so quick. I tried to add that into the query but it dont seem work. It changes this: WHERE Status = Forms! ScheduleParameterForm.status OR IsNull(Status) = IsNull(ScheduleParameterForm.status) to this: "WHERE Status"="Forms! ScheduleParameterForm.status" Or IsNull("Status")=IsNull([ScheduleParameterForm].[status]) When I enter it into the query it then pops up a parameter box. I did play around with but again to no avail. Thanks. |
|
|
|
Jan 11 2011, 11:38 AM
Post
#4
|
|
|
Access Wiki and Forums Moderator Posts: 47,918 From: SoCal, USA |
Hi,
Not sure if you did it the right way. Did you? 1. Go to Design View of your query 2. Change to SQL view 3. Replace the WHERE condition with the one I posted Hope that helps... |
|
|
|
Jan 11 2011, 12:01 PM
Post
#5
|
|
|
UtterAccess Addict Posts: 148 From: Wales UK |
sorr my mistake
just did it that way and although it shows null values when i select Tender it just adds them to the total records showing the null values and tenders and not just shows those records with tenders. It also still trys to find the control name with a pop up box. Thanks again for your help. |
|
|
|
Jan 11 2011, 12:18 PM
Post
#6
|
|
|
Access Wiki and Forums Moderator Posts: 47,918 From: SoCal, USA |
Can you post a small copy of your db with test data?
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 19th May 2013 - 03:15 PM |