autopopulate field in subform from field in main form

S

Skeletor

I have a Customer Details Form bound to a "Customer Details" Table. I also
have an "Appointments" subform attached to it that is bound to the
"Appointments" table.

I would like to auto-populate the "Appt" field on the subform with data from
the "Name" and "Phone Number" fields. I would also like to auto-populate the
"Location" field on the subform with data from the "Address", "Suburb" and
"State" fields from the main form.

How do I do this so that the underlying "Appointments table" can store the
information from the subforms fields?
Thankyou in advance
Mike
 
D

DStegon via AccessMonster.com

Why do you want to store the name and phone in the appointments table. Just
store the customer ID from the customer detail table (the PK) and then when
yo need to display the date you use a query joining the appt and customer D
tables. You really dont want to store "information" twice. If it is already
stored in a table somewhere is is wize not to store it again, but to store a
"pointer" (the Primary Key usually) to the information.

CustomerD
CustomerD_ID
Phone
Address
Subrub
blah

Appointment
CustomerD_ID
Appointment_DT
Employee_ID (link the person going on the appointment if needed)
AppointmentNotes (might like to store info about the appointment...)
and so on....

When displaying the appointment data in your subform, use a query to bind the
two tables inner joining the CustomerD_ID from teh two tables making it
possible to show the data you want on the subform.
 
S

Skeletor

Thankyou for your help. The "Appointments" table is used to send the
appointment to Outlook. Or can this be acheived another way? If so. How?
Best Wishes
Mike
 
J

John W. Vinson

Thankyou for your help. The "Appointments" table is used to send the
appointment to Outlook. Or can this be acheived another way? If so. How?

Yes; use a Query joining the appointments table to the employee table, and use
that Query for the transfer to Excel. It's not necessary to use a Table.
 
S

Skeletor

It's Working!!!!! Thankyou to John and DStegon.

John W. Vinson said:
Yes; use a Query joining the appointments table to the employee table, and use
that Query for the transfer to Excel. It's not necessary to use a Table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top