Garry in Perth
New Member
- Joined
- Aug 18, 2004
- Messages
- 21
Hi folks,
Hopefully a simple one.
I have two tables to keep track of my customers; Companies and Customers. Some companies may have several locations; so the relationship needs to be a One:Many. But in a lot of cases, there is only one customer per company, so the basic Customer details (name, address, phone, fax, etc.) are the same as the Company details.
When I need to add a new Company & Customer pair, I use a simple Add New Company form to input the Company data. So far so good.
Then I open up the Add New Customer form, and in a rectangle (option group) I input the Company ID to display the recently inputted Company data (name, address, etc.). I have been then copying and pasting each field from the Companies table to the Customers table. I want to create a button to invoke a macro that will copy (or "map") all the corresponding fields from the Company table into the Customer table in one go.
For example,
Company.Name ---> Customer. Name
Company.Address ---> Customer Address
etc.
Could SKS please start me off on the design of such a macro.
I am not a SQL programmer, so I prefer to use the Macro Builder.
Thanks
Hopefully a simple one.
I have two tables to keep track of my customers; Companies and Customers. Some companies may have several locations; so the relationship needs to be a One:Many. But in a lot of cases, there is only one customer per company, so the basic Customer details (name, address, phone, fax, etc.) are the same as the Company details.
When I need to add a new Company & Customer pair, I use a simple Add New Company form to input the Company data. So far so good.
Then I open up the Add New Customer form, and in a rectangle (option group) I input the Company ID to display the recently inputted Company data (name, address, etc.). I have been then copying and pasting each field from the Companies table to the Customers table. I want to create a button to invoke a macro that will copy (or "map") all the corresponding fields from the Company table into the Customer table in one go.
For example,
Company.Name ---> Customer. Name
Company.Address ---> Customer Address
etc.
Could SKS please start me off on the design of such a macro.
I am not a SQL programmer, so I prefer to use the Macro Builder.
Thanks