Ok I rewrote the variables and tried it without dates
but when I do something like this in code
rs.FindFirst "[Teacher] = """ & Me.TeacherName & """" & "[date]= " &
Me.date & "[formsname]= """ & Me.FormsName & """"
I get object not supported by this type of object
so I changed it to
rs.FindFirst "[Teacher] = """ & Me.TeacherName & """" & "[date]= """ &
"#" & Me.date & "#" & """" & "[formsname]= """ & Me.FormsName & """"
same error
so last but not least I tried
rs.FindFirst "[Teacher] = """ & Me.TeacherName & """" & "[Date]=#" &
Forms![formpamcriss]![date] & "#" & "[formsname]= """ & Me.FormsName &
""""
same thing again
I can't seem to get this to work no matter what
Is this the arcane way to find a match with multible criteria?
On 9 Oct 2006 15:11:50 -0700,
pi********@hotmail.com wrote:
>
sparks wrote:
>I am trying to find valid records in a table
but I must compare a date field to a date stored in the table
I can see where this is wrong (ok I guess its not text)
"[date]= """ & Me.date & """"
so how do you format for a date comparison of a date field in a table
and compared to a text box with a date format?
is it something like
"[date]= """ & "#" & Me.date &"#" & """"
If you remove all the quotes you should be fine.
"[SomeDate]=" & Forms![MyOpenForm]![txtDateFieldOnForm]
or you could include the # signs, but I don't think you need to
"[SomeDate]=#" & Forms![MyOpenForm]![txtDateFieldOnForm] & "#"