Autofill Subform fields from Form Fields

  • Thread starter Thread starter Kristen
  • Start date Start date
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!
 
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
 
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!
.
.
 
Back
Top