T
Tim
Hello again.
I have a query by form that im looking for physical
characteristics. The fields are birthday, race, sex,
hight, weight, hair color, and eye color. I want to be
able to plug any data into any of the fields and leave the
others blank to return results.
I have this statement: Age: DateDiff("yyyy",[DOB],Date())-
IIf(Format([DOB],"mmdd")>Format(Date(),"mmdd"),1,0)
this is in the Field line of the QBE.
It converts the DOB to a number in order to use:Between
[Forms]![Search Box]![age1] And [Forms]![Search Box]!
[age2].
I then put:[Forms]![Search Box]![Race] Or [Forms]![Search
Box]![Race] is Null. for the race criteria, and similar
one for the sex.
When I get to Height and Weight I want to use another
Between...And. for that, BUT when I do, I find I cant
leave it blank or no records are returned, even if other
criteria is entered.
I can leave either race or sex blank with no problems.
Does anyone know how to write the synatx to allow me to
leave the Between And fields blank. (I cant leave the age
blank either) in order to pull up the records that i have
entered criteria for????
Thank you in advance
Tim
I have a query by form that im looking for physical
characteristics. The fields are birthday, race, sex,
hight, weight, hair color, and eye color. I want to be
able to plug any data into any of the fields and leave the
others blank to return results.
I have this statement: Age: DateDiff("yyyy",[DOB],Date())-
IIf(Format([DOB],"mmdd")>Format(Date(),"mmdd"),1,0)
this is in the Field line of the QBE.
It converts the DOB to a number in order to use:Between
[Forms]![Search Box]![age1] And [Forms]![Search Box]!
[age2].
I then put:[Forms]![Search Box]![Race] Or [Forms]![Search
Box]![Race] is Null. for the race criteria, and similar
one for the sex.
When I get to Height and Weight I want to use another
Between...And. for that, BUT when I do, I find I cant
leave it blank or no records are returned, even if other
criteria is entered.
I can leave either race or sex blank with no problems.
Does anyone know how to write the synatx to allow me to
leave the Between And fields blank. (I cant leave the age
blank either) in order to pull up the records that i have
entered criteria for????
Thank you in advance
Tim