Option Compare Database
Private Sub btnAddParticipants_Click()
Private MfrmPickList As Form_FormPickList
End Sub
Sure does contain an error. Move the 'Private MfrmPickList ...' statement before the 'Private Sub btnAddParticipants_Click()' statement.
I might as well give you the extended code for the button click event.
Code:
Private Sub btnAddParticipants_Click()
Set MfrmPickList = New Form_frmPickList
MfrmPickList.lngConversationID = Me.ID
MfrmPickList.lstParticipants.RowSource = _
"SELECT ID, LastName, FirstName FROM tblPeople " & _
"WHERE ID NOT IN(SELECT PersonID FROM tblParticipants WHERE ConversationID = " & Me.ID & ");"
MfrmPickList.Modal = True
MfrmPickList.Visible = True
End Sub