can't search

  • Thread starter Thread starter Dan
  • Start date Start date
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
 
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.
 
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.
 
Back
Top