R
RobUCSD
Can anyone tell me what's wrong with this? Thanks, Rob
Dim db As DAO.Database
Dim strSQL As String
Dim varItm As Variant
Set db = CurrentDb()
With Forms!frmRNnotes!lstRNnotesLU
For Each varItm In .ItemsSelected
strSQL = CurrentDb.Execute ("INSERT INTO tblRNnotes (fldRNnotes, fldVisitNo)
" _
& "VALUES ('" & .ItemData(varItm) & ", " & .fldVisitNo Key &
"');"),dbFailOnError
Next varItm
End With
Debug.Print
Dim db As DAO.Database
Dim strSQL As String
Dim varItm As Variant
Set db = CurrentDb()
With Forms!frmRNnotes!lstRNnotesLU
For Each varItm In .ItemsSelected
strSQL = CurrentDb.Execute ("INSERT INTO tblRNnotes (fldRNnotes, fldVisitNo)
" _
& "VALUES ('" & .ItemData(varItm) & ", " & .fldVisitNo Key &
"');"),dbFailOnError
Next varItm
End With
Debug.Print