Adding items...

AuroX7

Registered User.
Local time
Yesterday, 19:37
Joined
Feb 22, 2006
Messages
44
MsgBox "Booking successfully added!", vbInformation
'Depending on which month is booked, will determine which listbox is goes in on frmMain
If Month(Me.Date_1) = 1 Then
Forms!frmCurrentBookings!ListJ.AddItem = Me.BoI 'Add to ListJ on
frmCurrentBookings
ElseIf Month(Me.Date_1) = 2 Then
Forms!frmCurrentBookings!ListF.AddItem = Me.BoI 'Add to ListF on frmCurrentBookings
End If

End Sub

So basically... I have a date field in the form 'frmAddBooking'... if the month of the date is 1 (January), then the conntents of the date field is added to a listbox in a different form (frmCurrentBookings)... but this doesn't work...

If somebody could help me I'd appreciate it greatly.
 
You have to save the record in the table before it will display in the list box.
 
Says it can't find 'frmCurrentBookings' when it's clearly labelled correctly, lol.

Can I add code to save before it adds the item to the listbox in the other form?
 
Last edited:

Users who are viewing this thread

Back
Top Bottom