I've made a button on my form which adds a booking ID into the listbox, but it doesn't seem to work. This is my code:
Private Sub Command18_Click()
Dim BoI As String
MsgBox "Booking successfully added!", vbInformation, "Booking"
If Month(Me.Date_1) = 1 Then
ListJ.AddItem Me.BoI
ElseIf Month(Me.Date_1) = 2 Then
ListF.AddItem Me.BoI
End If
End Sub
If someone could tell me the problem, I'd appreciate it. Thank you.
Private Sub Command18_Click()
Dim BoI As String
MsgBox "Booking successfully added!", vbInformation, "Booking"
If Month(Me.Date_1) = 1 Then
ListJ.AddItem Me.BoI
ElseIf Month(Me.Date_1) = 2 Then
ListF.AddItem Me.BoI
End If
End Sub
If someone could tell me the problem, I'd appreciate it. Thank you.
