A family of Microsoft relational database management systems designed for ease of use.
"JWCrosby" wrote in message
news:*** Email address is removed for privacy ***...
> Thanks, Dirk. I created this database in an earlier life when I didn't
> know better than to use the field name "Date." So I made some changes and
> in the queries for the two forms changed the name of the Date field to
> AssignedDate. Actually, that field is a string (ex, "Saturday November
> 20") and not really a date.
>
> So, now I have this code, but still get the same error:
>
> DoCmd.OpenForm stDocName, , , "[AdjudicatorKey] = " & Me.AdjudicatorKey
> & " AND [AssignedDate] = " & Me.AssignedDate
>
> Appreciate any further help.
>
> Jerry
>
If it's not really a date, you won't use the # character to delimit the
value, but since what it really is is a text value, you need to put it in
quotes. Assuming it won't ever contain the single-quote character ('), you
can use that as the quote for the text value, which makes life a bit easier:
'
DoCmd.OpenForm stDocName, , , _
"[AdjudicatorKey] = " & Me.AdjudicatorKey & _
" AND [AssignedDate] = '" & Me.AssignedDate & "'"
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html