Microsoft
Software
Hardware
Network
Question : Updating a table using SQL and variables
I need to update tblPAA with variables defined in the sub procedure.
DoCmd.RunSQL "INSERT INTO tblPPA (intPPAID, intIncidentID, txtPPAEffectiveDate, txtPPAPeriod, datPPAExpiryDate, txtFirstName, txtMiddleName, txtLastName, txtAddress, txtCity, txtStateProv, txtPostalZip, txtDOB, txtDatedDate, txtInvestigator, intViolationSelfExclusion)
SELECT (strPPANum, intIncidentID, datPPAEffectiveDate, strPPAPeriod, datPPAExpiryDate, strFirstName, strMiddleName, strLastName, txtAddress, txtCity, txtStateProv, txtPostalZip, datDOB, datDate, strInvestigator, strViolationSE);"
When I run this line of code I get: "syntax error (comma) in query expression"
Answer : Updating a table using SQL and variables
try this
DoCmd.RunSQL "INSERT INTO tblPPA (intPPAID, intIncidentID, txtPPAEffectiveDate, txtPPAPeriod, datPPAExpiryDate, txtFirstName, txtMiddleName, txtLastName, txtAddress, txtCity, txtStateProv, txtPostalZip, txtDOB, txtDatedDate, txtInvestigator, intViolationSelfExclusion)
Values ('" & strPPANum & "',"& intIncidentID &", #"& datPPAEffectiveDate &"#,'" & strPPAPeriod & "', #"& datPPAExpiryDate &"#, '" & strFirstName & "', '" & strMiddleName & "', '" & strLastName & "', '" & txtAddress & "', '" & txtCity & "', '" & txtStateProv & "', '" & txtPostalZip & "', #"& datDOB &"#, #"& datDate &"#, '" & strInvestigator & "', '" & strViolationSE & "');"
Random Solutions
Internet Explorer - Links redirecting to strange sites
Fax services SBS 2008
Revert to Visual Studio 2008
well vs borewell
I need sample jsp programs using MySQL data base.
Network Diagnostic Tool on CentOS 5.4
rsync with One host in DMZ
How to make vba wait for Cube formulas to calculate?
Can I use server scripts with iPad?
SBS 2008 How to Change the Company web Page Calender Date Format