how to stop combobox value being selected once selectded

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

once i selected a value in the combo box i dont want it to be avalible to be
selected again. this is in use as an appointment system eg. if i select a
time for an appointment i dont want to be able to pick the same time again to
prevent double booking

thanks
 
Sounds like your application already has the combo-box displaying available
appointment slots. Its recordsource will therefore be a query which shows
available time slots. Probably all you need, assuming that your existing
code is based on the AfterUpdate event of the combo-box to set up the
appointment for the selected slot, is for the code to also requery the
combo-box so it updates to show the appointment slots available after the
update; if so, just include

Me.comboboxName.Requery

in the code for the combo-box's AfterUpdate event, after all the other
processing has occurred.

HTH

Rob
 
Back
Top