IT WORKS!!!!!!! THANK YOU!!!!
Code:
Private Sub pbbLoadSelectedBlock_Click()
'This code allows me to copy all items from EventsMaster : table to --> EventsLog : table AND assign then to the USERID of selected USERID on the form "UserDetails
If MsgBox("Do you want to load the selected BLOCK Default Events for this user? ", vbQuestion + vbYesNo) = vbYes Then
Me.Refresh
Else
MsgBox "Ok, good catch!", acSaveNo
End If
' this may load 1 event//// CurrentDb.Execute ("INSERT INTO myTable (Major, Time, Ne, Escalation, Description) VALUES('" & myListBox.Column(1) & "', " & myListBox.Column(2) & ", '" & myListBox.Column(3) & "', '" & myListBox.Column(4) & "', '" & myListBox.Column(5) & "')")
' This will load only the selected events that match the PHASE/BLOCK that has been selected in the combobox. The WHERE command is the uniqie part.
CurrentDb.Execute "INSERT INTO EventsLog(UserID,EventName,EventDiscription,EventStart,EventComplete,EventPhase,EventInstructor,EventInstructorNotes) SELECT " & Me.UserID & ",EventName,EventDiscription,EventStart,EventComplete,EventPhase,EventInstructor,EventInstructorNotes FROM EventsMaster WHERE EventPhase = '" & Me.cbbBlockLoadSelect & "'"
MsgBox "New Events have been loaded!!!", vbInformation, "Success"
'This will refresh the form and updates the listbox to display the new Events
Form.Refresh