Solved Insert Into SQL statement

Momma

Member
Local time
Today, 21:19
Joined
Jan 22, 2022
Messages
130
Hi
I'm getting a Syntax error in the RunSQL statement. It must be something to do with the date because it works fine when I leave it out. I did a compile with no errors.


Code:
DoCmd.RunSQL "INSERT INTO tblDogsChecklist (ContactID, DogID, InfoEmail) " & _
      " VALUES ContactID, DogID, (date())"
 
Is InfoEmail a date field?
 
The left paren before (date()) should move between VALUES and ContactID
Code:
DoCmd.RunSQL "INSERT INTO tblDogsChecklist (ContactID, DogID, InfoEmail) " & _
      " VALUES (ContactID, DogID, date())"

hth,
d
 
The left paren before (date()) should move between VALUES and ContactID
Code:
DoCmd.RunSQL "INSERT INTO tblDogsChecklist (ContactID, DogID, InfoEmail) " & _
      " VALUES (ContactID, DogID, date())"

hth,
d
 
The left paren before (date()) should move between VALUES and ContactID
Code:
DoCmd.RunSQL "INSERT INTO tblDogsChecklist (ContactID, DogID, InfoEmail) " & _
      " VALUES (ContactID, DogID, date())"

hth,
d
That worked, thank you so much. I appreciate your help!
 

Users who are viewing this thread

Back
Top Bottom