H
headly
I figure I'm close with this code, but it generates a syntax error on the
Docmd.RunSQL statement, probably related to my variable assignment above. TIA
for any assistance
Private Sub btnAppend_Click()
'Pass the current record to another table
Dim varID As Variant
varID = Me.ID
Dim mySQL As String
mySQL = "INSERT INTO tblTAs ( FirstName, LastName )" & " SELECT
tblPersonnel.FirstName, tblPersonnel.LastName" & " FROM tblPersonnel WHERE
(((tblpersonnel.id=" & varID & "));"
DoCmd.RunSQL mySQL
End Sub
Docmd.RunSQL statement, probably related to my variable assignment above. TIA
for any assistance
Private Sub btnAppend_Click()
'Pass the current record to another table
Dim varID As Variant
varID = Me.ID
Dim mySQL As String
mySQL = "INSERT INTO tblTAs ( FirstName, LastName )" & " SELECT
tblPersonnel.FirstName, tblPersonnel.LastName" & " FROM tblPersonnel WHERE
(((tblpersonnel.id=" & varID & "));"
DoCmd.RunSQL mySQL
End Sub