Problem in FindFirst

arunakumari02

Registered User.
Local time
Today, 13:31
Joined
Jun 2, 2008
Messages
91
I am getting an error

Syntax error in date expression

Code:
   rstDemanded.FindFirst "[Month]=#" & Forms!frmProject("txtMonth" & intMonth) & _
 "# AND [ID] =" & Forms!frmProject("txtRID" & intRow) & "AND [PID] =" & labPID

Any help
 
Just a casual glance and I noticed a couple of things:
1. Never, ever, ever, name an object "Month".
2. What is "intMonth"? That just doesn't look like good syntax (I could be wrong).

You haven't really given us much to go on.

What do you get in the immediate window when you put this before the statement in question:
Code:
Debug.Print "[Month]=#" & Forms!frmProject("txtMonth" & intMonth) & _
 "# AND [ID] =" & Forms!frmProject("txtRID" & intRow) & "AND [PID] =" & labPID

If that gives you an error, reduce it until it doesn't. Then add back in elements, troubleshooting them one at a time.
 

Users who are viewing this thread

Back
Top Bottom