Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating a table when field in one = field in other

Status
Not open for further replies.

camidon

Programmer
May 9, 2000
268
US
I have two tables in my database. One with customer information and one with the customers address information.
I have two seperate forms. The tables are related by a field in both called RCustomerID. I'm not displaying the ID on either form. I need to know how to reference this field so that when I have customer 4453 open and I open the Address form from the form, it opens the address for Customer 4453 and not customer 1.

I know I'm going to have to use the Openform method of the Docmd function, but I just don't know how to structure the query. I'm thinking something like:

SELECT fields FROM tables WHERE ??how do I say "customerid in table1 = customerid in table2"??

I need to be able to update this information.

Thanks in advance!

Chris
 
Sorry, my question is about as clear as mud. Let me put it more simply and i think I should be able to take it from there.

I would like to know how to tell which record in a table that a form has open so that I can find out the value of another field in that record.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top