If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
"If the user enters something, return something, otherwise return everything"
I need a expression for a query thinger. The database
has 4 possible values for a field called "Voltage", these values are 11, 33, 0 or NULL (NULL being actually nothing, not the word "NULL"). I want a query that will ask the user for an input and if they enter something (say, 33), it will show whatever they ask for (like all the 33s), otherwise show everything. I can get it to filter everything OK (to just show my 33s and such like), however the problem I am having is when the user enters nothing, as the records that have a NULL voltage are not being shown. Any ideas anyone? Sorry if this makes no sense, this has been bugging me for hours and I'm a smudge stressed. Thanks, Chris |
#2
|
|||
|
|||
Set it up as follows.
Field: Voltage Criteria: [Enter Voltage] OR [Enter Voltage] is Null When you save this, Access will restructure it so the next time you open it, it will look different but it should still work. Be warned that this technique will fail if there are too many criteria in the query. Chris Mortimore wrote: I need a expression for a query thinger. The database has 4 possible values for a field called "Voltage", these values are 11, 33, 0 or NULL (NULL being actually nothing, not the word "NULL"). I want a query that will ask the user for an input and if they enter something (say, 33), it will show whatever they ask for (like all the 33s), otherwise show everything. I can get it to filter everything OK (to just show my 33s and such like), however the problem I am having is when the user enters nothing, as the records that have a NULL voltage are not being shown. Any ideas anyone? Sorry if this makes no sense, this has been bugging me for hours and I'm a smudge stressed. Thanks, Chris |
#3
|
|||
|
|||
Fantastic, thank you muchly Tis working perfectly now,
hence I can get paid this month. -----Original Message----- Set it up as follows. Field: Voltage Criteria: [Enter Voltage] OR [Enter Voltage] is Null When you save this, Access will restructure it so the next time you open it, it will look different but it should still work. Be warned that this technique will fail if there are too many criteria in the query. Chris Mortimore wrote: I need a expression for a query thinger. The database has 4 possible values for a field called "Voltage", these values are 11, 33, 0 or NULL (NULL being actually nothing, not the word "NULL"). I want a query that will ask the user for an input and if they enter something (say, 33), it will show whatever they ask for (like all the 33s), otherwise show everything. I can get it to filter everything OK (to just show my 33s and such like), however the problem I am having is when the user enters nothing, as the records that have a NULL voltage are not being shown. Any ideas anyone? Sorry if this makes no sense, this has been bugging me for hours and I'm a smudge stressed. Thanks, Chris . |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
I can't see emails in my user account after another user opens it | Andy E. | Outlook Express | 5 | July 23rd, 2004 12:01 PM |
Log-in (form or event) | Jackie | General Discussion | 7 | July 21st, 2004 04:52 PM |
synchronise different user profile calendars | Ollieblue | General Discussion | 5 | July 20th, 2004 05:14 PM |
adding logged in user to text box | dennis | Database Design | 7 | June 7th, 2004 07:26 PM |
not installed for current user | phil maida | Setting up and Configuration | 1 | May 27th, 2004 07:11 AM |