Delete a record from a table from a form selection

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

Guest

Good Day,
I have a real simple database that I would like some help on. I am
creating a simple one to control appoinments for truck drivers. Each day has
a certain number of 'slots' for appointments. A form creates a random
appointment number and saves it to a table called 'appointments'. In the
form, I have a combo box that pulls from a table called 'dates'. I would like
to have the user select a date and time from the combo box, have the record
writen to the appointments table, and then deleted from the 'dates' table so
it is no longer either visable or deleted completely.
Using Access 2000 on 2000 and XP mmachines...
If I did not describe the issue well, please ask me further questions so I
can get this figured out. If need be, I can send the responder the database
(very small) so they can play with it...

Thank you very much in advance to all,

Ian
 
I have a suggestion that may work for you. Instead of moving the data from
one table to another, have a field in the table that identifies whether the
record is a Date or an Appointment.

when you select the date and time for the appointment, you should first do a
DLookup to be sure the slot is availabe and update the record to show it is
now an appointment and the date and time of the appointment.

Now to see only Date records, filter your form on the field that shows
whether it is a date or an appointment. Of course, the other way round if it
is Appointment records you want to see.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top