Marc
TPer Emeritus
- Messages
- 34,282
- Edit My Images
- Yes
I am trying to do something in MS Access and have hit a brick wall. I have created a form into which users can enter data with which to bring back results from other tables. The input data is placed in a table, then a query is run which uses the input data as a parameter for certain fields. So far so good.
The problems occur when the user leaves a field on the form blank. If I place a "*" in the criteria field of a query then all data is returned. If I point to another table/field which has data then all matching data is returned. Does anybody know how I can get the query to return data where the lookup field is blank? I have tried an IF statement but have failed miserably.
I should point out that I have no vba or SQL knowledge and only use the basic query functions so please go easy on me where code is concerned. It's MS Access 2003 if that makes a difference.
Would be most greatful for any assistance.
The problems occur when the user leaves a field on the form blank. If I place a "*" in the criteria field of a query then all data is returned. If I point to another table/field which has data then all matching data is returned. Does anybody know how I can get the query to return data where the lookup field is blank? I have tried an IF statement but have failed miserably.
I should point out that I have no vba or SQL knowledge and only use the basic query functions so please go easy on me where code is concerned. It's MS Access 2003 if that makes a difference.
Would be most greatful for any assistance.