PMFJI
If SiteId is a text data type, then add the quotes (red) into the SQL as shown. June7 mentioned they were missing.
CurrentDb.Execute "INSERT INTO MyTable(Datadate, SiteID) VALUES(#" & dteDate & "#, '" & Me.SiteID & "')"
PMFJI
If SiteId is a text data type, then add the quotes (red) into the SQL as shown. June7 mentioned they were missing.
CurrentDb.Execute "INSERT INTO MyTable(Datadate, SiteID) VALUES(#" & dteDate & "#, '" & Me.SiteID & "')"
Thanks for the help, works perfectly now