Copy Data from one Subform to another Subform

  • Thread starter Thread starter Nigel King
  • Start date Start date
N

Nigel King

Hi, I'm designing a small hotel database to manage Bookings (tblbookings).

Sometimes a person enquiring (tblEnquirer) makes bookings for multiple
guests (tblGuests), requiring different names/addresses for Enquirer and
Guest. But most of the time the Enquirer and Guest is the same person, with
the same details.

The main form (frmbookings) has two subforms (subfrmEnquirer) and
(subfrmGuests). I am trying to create a macro that copies the contents of
the seven name/address fields from one subform across to the other.

How can I do this using just one or two actions?

Many thanks
 
I can get the data to copy across using a cut macro and a paste macro, but
it has to be done for every single field, which is laborious. A macro that
could run all the macros in sequence would be good, but I cant shift the
focus between subforms.

I have also created a MakeTable query, which holds all the data I need, but
I don't know how to get it into the required subform.

Thanks
 
It seems to me that tblEnquirer & tblGuests should be combined into ONE
Table tblPerson then you can simply copy the PersonID (by code) between the
2 Subforms. This follows more in line with Relational Databse Design and
avoid duplication as much as possible.
 
Back
Top