can't search

D

Dan

On my form I have a text box named "age" that calculates
the age based on the date of birth. The text box is equal
to: =DateDiff("yyyy",[Date Of Birth],Date())-IIf(Format
([Date Of Birth],"mmdd")>Format(Date(),"mmdd"),1,0).
It calculates the age fine but when I try to search for an
age it gives an error saying the control 'age' the macro
that is attempting to search can't be searched. All it is
is the find record command. I can search everything else
but the age box and I used to be able to search the age
box but it just stopped working out of the blue. Does
anyone know what could of happened? Thanks
 
D

Dan

I don't know if this will help at all but I just found out
that I can search if I select the match case box under the
more section of the find command.
 
J

John Vinson

On my form I have a text box named "age" that calculates
the age based on the date of birth. The text box is equal
to: =DateDiff("yyyy",[Date Of Birth],Date())-IIf(Format
([Date Of Birth],"mmdd")>Format(Date(),"mmdd"),1,0).
It calculates the age fine but when I try to search for an
age it gives an error saying the control 'age' the macro
that is attempting to search can't be searched.

I'd suggest putting this expression in a vacant Field cell in the
form's Query (replacing the = sign with Age: to create a new
calculated field in the Query). The field will then work just like any
other table field, with the exception that it cannot be edited.
 

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