Using variables in SQL update

marcuscoker

Registered User.
Local time
Today, 07:05
Joined
Sep 28, 2005
Messages
49
Hi

was wondering if anybody could help me with this

I have the following piece of code

DoCmd.RunSQL "INSERT INTO dbo_TblFileLoaded (PracticeCode, ExtractID) VALUES (sPractice,sExtract)", -1

sPractice,sExtract are variables that i have declared earlier in the code. However, when i run this script it does not put these values into the database. Can anybody help please?
 
Code:
DoCmd.RunSQL "INSERT INTO dbo_TblFileLoaded (PracticeCode, ExtractID) VALUES (" & sPractice & "," & sExtract & ")", -1
 
thanks
for that
 

Users who are viewing this thread

Back
Top Bottom