A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

"If the user enters something, return something, otherwise return everything"



 
 
Thread Tools Display Modes
  #1  
Old September 6th, 2004, 02:35 PM
Chris Mortimore
external usenet poster
 
Posts: n/a
Default "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  
Old September 6th, 2004, 03:27 PM
John Spencer (MVP)
external usenet poster
 
Posts: n/a
Default

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  
Old September 6th, 2004, 03:35 PM
Chris Mortimore
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 03:51 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.