Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IN clause not used properly - what else can I use? 1

Status
Not open for further replies.

Hillary

Programmer
Feb 15, 2002
377
US
I have the following formula in a query...

DateOfEntryGrade9: IIf([Current Grade Level] In (["09","10',"11","12"]) And IsNull([Date of Entry Grade 9]),"Date of Entry Grade 9 - Null Error",IIf([Current Grade Level]<>["09","10","11","12"] And Not (IsNull([Date of Entry Grade 9])),"Date of Entry Grade 9 - Not Null Error",""))


When I run the query, Access is prompting for a Parameter and shows, "09","10',"11","12"

I've read the help files and it looks as if IN is wrong. Does anyone know how I can re-word the formula?

I'm trying to get a simple error message if a student is in grade 9, 10, 11 or 12 and does not have a date in the field [Date of Entry to Grade 9] or if a student is not is one of those grades and does have a date in field [Date of Entry to Grade 9]. In other words, [Date of Entry to Grade 9] should only be, and must be, populated if a student is in a grade 9-12 inclusive.

Thanks,

Hillary
 
In ("09","10","11","12")

Not In ("09","10","11","12")

If [Current Grade Level] is defined as numeric, get rid of the quotes.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top