R
RobUCSD
With the code below I'm getting; "Run-time Error '2480' you reffered to a
property by a numeric argument that isn't one of the property numbers in the
collection."
Debug.Print gave me this; db nothing, strSql nothing, VarItem Emptly.
I think I'm doing something wrong in the INSERT INTO tblRNnotes
(fldRNnotesLUno) part of the code.
Pls help if you can, thanks, Rob
*******************************************************
Private Sub lstRNnotesLU_DblClick(Cancel As Integer)
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 = "INSERT INTO tblRNnotes (fldRNnotesLUno) " & _
"VALUES('" & .ItemsSelected(varItm)
db.Execute strSQL, dbFailOnError
Next varItm
End With
Debug.Print
End Sub
**********************************************************
property by a numeric argument that isn't one of the property numbers in the
collection."
Debug.Print gave me this; db nothing, strSql nothing, VarItem Emptly.
I think I'm doing something wrong in the INSERT INTO tblRNnotes
(fldRNnotesLUno) part of the code.
Pls help if you can, thanks, Rob
*******************************************************
Private Sub lstRNnotesLU_DblClick(Cancel As Integer)
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 = "INSERT INTO tblRNnotes (fldRNnotesLUno) " & _
"VALUES('" & .ItemsSelected(varItm)
db.Execute strSQL, dbFailOnError
Next varItm
End With
Debug.Print
End Sub
**********************************************************