Removing data from drop down

  • Thread starter Thread starter Fred
  • Start date Start date
F

Fred

Hello all,
I have unbound combo box for parking spaces and when I assign someone
a parking space I would that parking space to become unavailable to the
combo box. I also have a expiration date that when it reaches this date
to put the space number back into the database. If there is no date I
have a check box when someone leaves that when it is checked needs to
also put that space back into the pull down list. Thanx for the help
Fred
 
In your table that holds parking spaces, add a column called Assigned with a
Yes/No type and a column called ExpirationDate with a Date/Time type. When
the space is assigned, update the Assigned field to True and add an
expiration date to that record.

Base your combobox on a query the filters out spaces where Assigned = True.
To release a space past the expiration date, you'll need a query that finds
records where the expiration date is older than today and set the
ExpirationDate value to null and the Assigned value to false. Then, you can
run this macro when the app opens or when the form opens by using a macro.

Barry
 
Back
Top