Query use of pop up box

B

Bob B

I have a query that does a last name, first name search using a pop up box.
In some cases I want to only enter the last name and display all entries with
the same last name. Can I do this in the same query. Leaving the first name
blank returns nothing.
 
D

Douglas J. Steele

Change the criteria for the first name from [First Name] to [First Name] Or
([First Name] Is Blank)
 
K

Ken Snell \(MVP\)

? Blank ? Did you mean Null?

--

Ken Snell
<MS ACCESS MVP>

Douglas J. Steele said:
Change the criteria for the first name from [First Name] to [First Name]
Or ([First Name] Is Blank)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Bob B said:
I have a query that does a last name, first name search using a pop up
box.
In some cases I want to only enter the last name and display all entries
with
the same last name. Can I do this in the same query. Leaving the first
name
blank returns nothing.
 
D

Douglas J. Steele

Thanks, Ken. Yes, I meant Null. Sorry, Bob!

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Ken Snell (MVP) said:
? Blank ? Did you mean Null?

--

Ken Snell
<MS ACCESS MVP>

Douglas J. Steele said:
Change the criteria for the first name from [First Name] to [First Name]
Or ([First Name] Is Blank)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Bob B said:
I have a query that does a last name, first name search using a pop up
box.
In some cases I want to only enter the last name and display all entries
with
the same last name. Can I do this in the same query. Leaving the first
name
blank returns nothing.
 
B

Bob B

This doesn't work: My criteria looks like this
Box 1 Box 2
LAST NAME FIRST NAME
criteria [Enter Last Name] [First Name]
Or ([First Name] IS Null)

This is saved. When I go back and look at it, the OR is changed to IS Null
and when I enter the leave First Name as blank it does not return anything.

Douglas J. Steele said:
Thanks, Ken. Yes, I meant Null. Sorry, Bob!

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Ken Snell (MVP) said:
? Blank ? Did you mean Null?

--

Ken Snell
<MS ACCESS MVP>

Douglas J. Steele said:
Change the criteria for the first name from [First Name] to [First Name]
Or ([First Name] Is Blank)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



I have a query that does a last name, first name search using a pop up
box.
In some cases I want to only enter the last name and display all entries
with
the same last name. Can I do this in the same query. Leaving the first
name
blank returns nothing.
 
D

Douglas J. Steele

Put [First Name] Or ([First Name] Is Null) in one cell.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Bob B said:
This doesn't work: My criteria looks like this
Box 1 Box 2
LAST NAME FIRST NAME
criteria [Enter Last Name] [First Name]
Or ([First Name] IS Null)

This is saved. When I go back and look at it, the OR is changed to IS
Null
and when I enter the leave First Name as blank it does not return
anything.

Douglas J. Steele said:
Thanks, Ken. Yes, I meant Null. Sorry, Bob!

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Ken Snell (MVP) said:
? Blank ? Did you mean Null?

--

Ken Snell
<MS ACCESS MVP>

message
Change the criteria for the first name from [First Name] to [First
Name]
Or ([First Name] Is Blank)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



I have a query that does a last name, first name search using a pop up
box.
In some cases I want to only enter the last name and display all
entries
with
the same last name. Can I do this in the same query. Leaving the
first
name
blank returns nothing.
 
B

Bob B

Yes thank you that works

Douglas J. Steele said:
Put [First Name] Or ([First Name] Is Null) in one cell.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Bob B said:
This doesn't work: My criteria looks like this
Box 1 Box 2
LAST NAME FIRST NAME
criteria [Enter Last Name] [First Name]
Or ([First Name] IS Null)

This is saved. When I go back and look at it, the OR is changed to IS
Null
and when I enter the leave First Name as blank it does not return
anything.

Douglas J. Steele said:
Thanks, Ken. Yes, I meant Null. Sorry, Bob!

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



? Blank ? Did you mean Null?

--

Ken Snell
<MS ACCESS MVP>

message
Change the criteria for the first name from [First Name] to [First
Name]
Or ([First Name] Is Blank)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



I have a query that does a last name, first name search using a pop up
box.
In some cases I want to only enter the last name and display all
entries
with
the same last name. Can I do this in the same query. Leaving the
first
name
blank returns nothing.
 
Top