Help with Listbox problem
I have designed an Access 2007 programme to take bookings. The day's bookings are displayed in a series of listboxes each covering a 15min time slot. Data is derived from 2 tables - the first storing the booking details , date, client, employee etc and the second storing the time and appointment type etc. When a booking is cancelled Access deletes the booking and cascade deletes the appointment times. My problem is that after the delete the and listboxes have been requeried, although the list box for that the timeslot is blank, I cannot add a new appointment into it because Access says there is still data there. If I add a MsgBox after the requery in the macro it still shows me the old AppointmentID. The only way I can clear the data is to close the form and reopen it which is not a very practical solution. Can anyone suggest a way to clear the listbox? I have attached a screenshot of the form.
I have designed an Access 2007 programme to take bookings. The day's bookings are displayed in a series of listboxes each covering a 15min time slot. Data is derived from 2 tables - the first storing the booking details , date, client, employee etc and the second storing the time and appointment type etc. When a booking is cancelled Access deletes the booking and cascade deletes the appointment times. My problem is that after the delete the and listboxes have been requeried, although the list box for that the timeslot is blank, I cannot add a new appointment into it because Access says there is still data there. If I add a MsgBox after the requery in the macro it still shows me the old AppointmentID. The only way I can clear the data is to close the form and reopen it which is not a very practical solution. Can anyone suggest a way to clear the listbox? I have attached a screenshot of the form.
Attachments
Last edited: