Hi -
I need to be able to do the following:
1)Enter "customer #" in a form field/control
2)Hit a button to run code to complete form fields with address, city, phone number, etc. which comes from a "customer" table.
I would like to do this in vba instead of having a sub form (with a query record source) based on the "customer #" field in the form.
I am currently running a docmd.openquery to get the customer information (address, city, phone number, etc.) filtered by "customer #" field, but I can't figure out how to reference the field in the query, i.e.
forms.orders.CustomerAddress = query.customers.CustomerAddress
where the query.customers is the query I ran on the "customer" table.
Regards....
I need to be able to do the following:
1)Enter "customer #" in a form field/control
2)Hit a button to run code to complete form fields with address, city, phone number, etc. which comes from a "customer" table.
I would like to do this in vba instead of having a sub form (with a query record source) based on the "customer #" field in the form.
I am currently running a docmd.openquery to get the customer information (address, city, phone number, etc.) filtered by "customer #" field, but I can't figure out how to reference the field in the query, i.e.
forms.orders.CustomerAddress = query.customers.CustomerAddress
where the query.customers is the query I ran on the "customer" table.
Regards....