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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2000 data copy question 1

Status
Not open for further replies.

psehudson

Programmer
Jan 30, 2008
9
US
I'm presently working on an Access 2000 database to track field failures. I'm trying to perform a fairly straightforward task but have trouble getting the thing to work (I'm new to DB programming). I have one table that contains customer information (name,address,phone #, etc.). I have another table that contains field failure data (date of failure, unit type, customer name). Rather than linking the customer name in the field failure table to the customer table via the relationship table, I need to make a copy of all the customer's contact information and place this in the field failure table. I would simply like to have the user type in the customer's phone number, perform a query to match this phone number with the number in the customer table, and then copy the other customer info into the field failure table. I thought I could do this with a query, but I can't figure out the syntax. It looks like I'm going to have to use VBA code and the ADO database commands to do this. Suggestions?

Thank you,

Steve
 
You could use Dlookup with the After Update event of the PhoneNumber control. For example:

[tt]me.txtCustomerAddress=Nz(DlookUp("Address","tblCustomers","PhoneNumber='" & Me.txtPhoneNumber & "'"),"None")[/tt]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top