wildcard number used in iif statement

P

pat c

My query looks at a textbox which is a customer number from a form as part of
an IIF statement as criteria in a query.
IIF(isnull([findcust]), wildcard number ,[findcust])

I tried "*" but it only works on text, not on numeric field, what shoud I
type to return all record?
 
J

John Spencer

Field: Customer Number
Criteria: [Find Cust] OR [Find Cust] is Null

Access will restructure the query when you save it.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
P

pat c

Sorry John,

I don't get it, what shoud I type to save in order for access to restructure
the query?

Thanks for your help!!

John Spencer said:
Field: Customer Number
Criteria: [Find Cust] OR [Find Cust] is Null

Access will restructure the query when you save it.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

pat c said:
My query looks at a textbox which is a customer number from a form as part
of
an IIF statement as criteria in a query.
IIF(isnull([findcust]), wildcard number ,[findcust])

I tried "*" but it only works on text, not on numeric field, what shoud I
type to return all record?
 
J

John Spencer

I assumed that you were using Design view.

Type the criteria as indicated.

Close and save the query
Reopen it and you will see that it has been restructured.

BEFORE you do that make a backup copy of the query in case this is NOT what
you want.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

pat c said:
Sorry John,

I don't get it, what shoud I type to save in order for access to
restructure
the query?

Thanks for your help!!

John Spencer said:
Field: Customer Number
Criteria: [Find Cust] OR [Find Cust] is Null

Access will restructure the query when you save it.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

pat c said:
My query looks at a textbox which is a customer number from a form as
part
of
an IIF statement as criteria in a query.
IIF(isnull([findcust]), wildcard number ,[findcust])

I tried "*" but it only works on text, not on numeric field, what shoud
I
type to return all record?
 
P

pat c

it works!!
Thanks very much for your help, John.

John Spencer said:
I assumed that you were using Design view.

Type the criteria as indicated.

Close and save the query
Reopen it and you will see that it has been restructured.

BEFORE you do that make a backup copy of the query in case this is NOT what
you want.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

pat c said:
Sorry John,

I don't get it, what shoud I type to save in order for access to
restructure
the query?

Thanks for your help!!

John Spencer said:
Field: Customer Number
Criteria: [Find Cust] OR [Find Cust] is Null

Access will restructure the query when you save it.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

My query looks at a textbox which is a customer number from a form as
part
of
an IIF statement as criteria in a query.
IIF(isnull([findcust]), wildcard number ,[findcust])

I tried "*" but it only works on text, not on numeric field, what shoud
I
type to return all record?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top