Need help copying ID to new form (1 Viewer)

Nitz927

New member
Local time
Today, 00:06
Joined
Oct 25, 2014
Messages
3
Hello,
I am currently creating a database which stores customer details and booking details.

I have the following tables: Customers and Reservations, both of which are linked by the CustomerID field.

The customer form automatically assigns a CustomerID when you enter data, however I then want the CustomerID to be copied on to the reservations form aswell. Also, the reservations form is a new form and not a subform.

Thank you
 

plog

Banishment Pending
Local time
Yesterday, 18:06
Joined
May 11, 2011
Messages
11,638
You haven't provided much detail about how users get from the Customer form to the Reservation form. So I'll tell you how I would do the whole thing.

On the Customer form, put a 'Reservation' button. In the code for that button, you read the CustomerID from the Customer form, put it into a variable, open the Reservation form, put the value into the CustomerID field (which should be a hidden and locked field).

If you are unfamiliar with that, use the wizard to automatically generate the code to open the Reservation form, then open the code and tuck in the code to read in the CustomerID and spit it out.
 

Users who are viewing this thread

Top Bottom