Really need help table relationship

Jon123

Registered User.
Local time
Today, 12:56
Joined
Aug 29, 2003
Messages
668
I have 2 tables both tables have an autonumber field set as no duplicates and the aotunumber is the primary key.
Table 1 has the customers and their personal info.
Table 2 has the customers visit and purches information.

I have a field in table 2 called Customer ID and this Number comes from table 1 and is the autonumber field. So when you create a new customer in table 1 the autonumber is used as their customer ID in table 2 when they visit and shop.

I'm trying to create a report that shows what customers did what and when but I'm getting screwie data back and I think its because my relationship are incorrect. Any help please

jon
 
I'm guessing that CustomerID in Table 1 has a One to Many relationship with the CustomerID in Table 2. If I am correct in this assumption then CustomerID in Table 2 should be set as a Number rather than an AutoNumber.

Now to record your CustomerID recorder in Table 2, will be dependant largely on how these two tables interact. If you are populating Table 2 through a Subform, then the two forms will be linked automagically by the CustomerID, which will be automatically populated whenever a new record is added in the sub-form. If the Table 2 is being populated by a form unrelated to the form that is holding your Customer details, you will need to pass the CustomerID to the second form via the OpenArgs property of the DoCmd.OpenForm.
 
got it thank you for the supprt
 

Users who are viewing this thread

Back
Top Bottom