R
RobUCSD
I have a form with paired listboxes that adds a record to the destination
lstVisitStaff when an item in the source lstStaff is double clicked on.
However, when I dblclick on another item in lstStaff it adds it to the list
but deletes the previous selection. Also, the line in the code for
CurrentDb.Execute sSQL gives me an error msg, but when I comment it out of
the code the code works with the exception of the above mentioned problem.
Heres the code below. Thanks for your help
Private Sub lstStaff_DblClick(Cancel As Integer)
Dim sSQL As String
sSQL = "Append tblVisitStaff WHERE fldStaffID = " & Me.lstStaff.Column(0)
CurrentDb.Execute sSQL
Me.Refresh
End Sub
lstVisitStaff when an item in the source lstStaff is double clicked on.
However, when I dblclick on another item in lstStaff it adds it to the list
but deletes the previous selection. Also, the line in the code for
CurrentDb.Execute sSQL gives me an error msg, but when I comment it out of
the code the code works with the exception of the above mentioned problem.
Heres the code below. Thanks for your help
Private Sub lstStaff_DblClick(Cancel As Integer)
Dim sSQL As String
sSQL = "Append tblVisitStaff WHERE fldStaffID = " & Me.lstStaff.Column(0)
CurrentDb.Execute sSQL
Me.Refresh
End Sub