G
Guest
I presently have a booking system which is Access 2000 DB and I want to add
some new functionality to allow the user to copy a booking to a new date for
repeat bookings. The problem I have is that after selecting the requested
record from a table and copying it back with a new date I now need to know
the auto number ID that has been assigned to this booking so that I can copy
the other linked tables that form this booking. The algorithm should be
something along the lines of
1) Select (field list) from event_table where event_id = selected_id;
2) Insert into event_table (values from above, except event_id which is an
auto number type, and new date);
Then for each of the linked tables.
3) Select (field list) from beverage_table where event_id = selected_id
4) Insert into beverage_table (values from above)
But how do I get the new event_id that would have been generated in step 1
so that the new entries in the second table link to the new booking and not
the old one?
Thanks
some new functionality to allow the user to copy a booking to a new date for
repeat bookings. The problem I have is that after selecting the requested
record from a table and copying it back with a new date I now need to know
the auto number ID that has been assigned to this booking so that I can copy
the other linked tables that form this booking. The algorithm should be
something along the lines of
1) Select (field list) from event_table where event_id = selected_id;
2) Insert into event_table (values from above, except event_id which is an
auto number type, and new date);
Then for each of the linked tables.
3) Select (field list) from beverage_table where event_id = selected_id
4) Insert into beverage_table (values from above)
But how do I get the new event_id that would have been generated in step 1
so that the new entries in the second table link to the new booking and not
the old one?
Thanks