Default Value in Form from a Table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My database has customer information. One table (tblCompanyInfo) is the main table for the customer information--main address, phone, customer type, etc. Another table (tblContactInfo) is for contact information for that customer, with the contact's address (sometimes different from the company address), phone, email, etc. The relationship between the two tables is established through the company ID#.

I am trying to set the default values for the address and phone in tblContactInfo to the corresponding values in tblCompanyInfo. First I tried to do this in the tables, but I don't think that will work, so I tried it in a form. I still can't get it to work. I have the properties of the address controls set to default to =[tblCompanyInfo.Address1] and so on, but it's not working.

I also tried setting up a macro on exit of the company ID# to repaint object. This brings in the company name, but it does not help with the address defaults

I'm not getting any error messages or other problems. The address fields just remain blank

Any ideas

Thank you
Avyn
 
Did you try using SetValue in the Macro?

Use SetValue - the first line asks for what value you
want to set and the second line asks for what value you
will set it to.
-----Original Message-----
My database has customer information. One table
(tblCompanyInfo) is the main table for the customer
information--main address, phone, customer type, etc.
Another table (tblContactInfo) is for contact information
for that customer, with the contact's address (sometimes
different from the company address), phone, email, etc.
The relationship between the two tables is established
through the company ID#.
I am trying to set the default values for the
address and phone in tblContactInfo to the corresponding
values in tblCompanyInfo. First I tried to do this in
the tables, but I don't think that will work, so I tried
it in a form. I still can't get it to work. I have the
properties of the address controls set to default to =
[tblCompanyInfo.Address1] and so on, but it's not
working.
I also tried setting up a macro on exit of the
company ID# to repaint object. This brings in the
company name, but it does not help with the address
defaults.
I'm not getting any error messages or other
problems. The address fields just remain blank.
 
Back
Top