Command Button - to open a new record with some of the data from the current record

  • Thread starter Thread starter Mike Hagstrom
  • Start date Start date
M

Mike Hagstrom

Good Day -

I am working on a limousine reservation system, which currently works just
fine.

When a reservation is taken, sometimes there is a "round trip" reservation -
i.e. the customer wants to go somewhere and return at a later date and time.

We would like to use a command button that would open a new record and take
some of the data from the underlying reservation record and insert the
selected data in the new form.

Can this be done? And if so, can you help with the "how". I've tried any
number of combinations without success.

Mike Hagstrom
 
Mike,

It can certainly be done.

If both forms are open at the same time then you could copy the values from
controls on one form to corresponding controls on the other.

If the new record opens in place of the 'underlying reservation record' then
you have to save the required data in variables before opening the new
record and then copy them into the corresponding controls.

Depending on how well the database has been designed it may only be a matter
of copying one or two fields. Eg. if you store the customer details in a
separate table to the reservation details then you would only have to copy
the customer id to the new reservation to have all the customer details
available.

Rod
 
Back
Top