I can't see the forest for the trees!
I am in VB trying to execute a [DoCmd.RunSQL strSQL] statement
Here is the code and the resulting msgbox:
_____________________________________
Private Sub cmdAddOne_Click()
Dim strSQL As String
Dim intContactID As Integer
Dim intEventID As Integer
intEventID = Me.lstAvailable.Column(0)
intContactID = Me.lstAvailable.Column(1)
strSQL = """" & "INSERT INTO tblEventAttendees ([EventID],[ContactNumber]) VALUES (" & """" & intEventID & """" & " , " & """" & intContactID & """" & "" & """;"
MsgBox strSQL
'DoCmd.RunSQL strSQL
End Sub
________________________________________________
msgbox Result:
"INSERT INTO tblEventAttendees ([EventID],[ContactNumber]) VALUES ("1" , "1"";
___________________________________________________________
What simple thing(s) am I missing? I am using Access Developers Handbook 1 (page 179) as a reference, but obviously I am missing something.
Thanks for the help
Thanks! JerseyBoy
Remember: self-praise is no recommendation
I am in VB trying to execute a [DoCmd.RunSQL strSQL] statement
Here is the code and the resulting msgbox:
_____________________________________
Private Sub cmdAddOne_Click()
Dim strSQL As String
Dim intContactID As Integer
Dim intEventID As Integer
intEventID = Me.lstAvailable.Column(0)
intContactID = Me.lstAvailable.Column(1)
strSQL = """" & "INSERT INTO tblEventAttendees ([EventID],[ContactNumber]) VALUES (" & """" & intEventID & """" & " , " & """" & intContactID & """" & "" & """;"
MsgBox strSQL
'DoCmd.RunSQL strSQL
End Sub
________________________________________________
msgbox Result:
"INSERT INTO tblEventAttendees ([EventID],[ContactNumber]) VALUES ("1" , "1"";
___________________________________________________________
What simple thing(s) am I missing? I am using Access Developers Handbook 1 (page 179) as a reference, but obviously I am missing something.
Thanks for the help
Thanks! JerseyBoy
Remember: self-praise is no recommendation