Re: Query criteria
- From: "John Spencer" <spencer@xxxxxxxxx>
- Date: Fri, 23 Feb 2007 11:29:58 -0500
Assuming your field ALWAYS has data you can use
LIKE IIf(Forms!Form1!Option=1,"Ohio","*")
Or if your field can contain nulls, you can force a value in it by appending
a zero length string and using the first option
Field: State: [TableName].[State] & ""
Criteria: LIKE IIf(Forms!Form1!Option=1,"Ohio","*")
If this is too slow, then there are other options available.
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
"Jim Pockmire" <jpockmire@xxxxxxxxxxxxxx> wrote in message
news:45def746$0$28099$4c368faf@xxxxxxxxxxxxxxxxx
I would like set criteria based on a value from a form, such that if the
value from the form is "1" a specific recordset is returned and if the
value is not "1" all records are returned. Can this be accomplished in a
single criteria cell?
e.g. I tried the following without success
=IIf(Forms!Form1!Option=1,"Ohio", Like "*")
.
- Follow-Ups:
- Re: Query criteria
- From: Jim Pockmire
- Re: Query criteria
- References:
- Query criteria
- From: Jim Pockmire
- Query criteria
- Prev by Date: Re: Matching Table value to Query Expression
- Next by Date: Making a max query
- Previous by thread: Query criteria
- Next by thread: Re: Query criteria
- Index(es):
Relevant Pages
|