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
Expand RAID 10
cgi-bin/test.pl Not Working
Load preview image using swfObject
show ip eigrp neighbors - What does the 'H' stand for ?
double proxy in IE
Starting mysqld from fedora
Visua Studio console program "not a valid Win32 application"
Function pointer corrupted/offset when passed to function
How can I add a user and password to AD with a power shell script?
Simplified Chinese grabled in Lotus Notes