Autofill Subform fields from Form Fields

K

Kristen

I have a Company form with the company address. Then it
has a subform, Contacts, with the contact's address.
Sometimes the contact has a different address than the
company (thus the separate place to enter it), but many
times the contact has the same address as the Company. Is
there a button I could make that would fill in the address
from the Company form to a specific contact in the Contact
subform?

Thank you!
 
B

Byron

There are any number of ways to accomplish what you are
wanting to do. You seem to want to use a button on the
subform so you can place code on the OnClick event of the
button for each of the address fields you want to
duplicate. The code would be something like:

Me![subfrmName].Form![SubformFieldName] =
me.YourAddresfield

Again, repeat this type of statement for each of the
address fields you need to duplicate in the subform.

HTH

Byron
 
K

Kristen

Thank you! I'll try that!
-----Original Message-----
There are any number of ways to accomplish what you are
wanting to do. You seem to want to use a button on the
subform so you can place code on the OnClick event of the
button for each of the address fields you want to
duplicate. The code would be something like:

Me![subfrmName].Form![SubformFieldName] =
me.YourAddresfield

Again, repeat this type of statement for each of the
address fields you need to duplicate in the subform.

HTH

Byron
-----Original Message-----
I have a Company form with the company address. Then it
has a subform, Contacts, with the contact's address.
Sometimes the contact has a different address than the
company (thus the separate place to enter it), but many
times the contact has the same address as the Company. Is
there a button I could make that would fill in the address
from the Company form to a specific contact in the Contact
subform?

Thank you!
.
.
 

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