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

1 Table 3 Forms

Status
Not open for further replies.

wayneswc

Technical User
Apr 1, 2003
7
GB
Hi

I have a large table with roughly 110 fields (large for me anyway), the table contains customer details and stores unique code numbers for products they have bought, so they all have a one to one realtionship, which is why i thought it easier to have one table.

The data is displayed on three different forms, purely to make it less cluttered for end users, the problem I have is i have shortcut buttons to take you from one form to another but when you enter another form, it takes you back to the first record in the table instead of the record you were previously on

How can i link the forms to keep the same record displayed?

And is this the better way or would it be better having three smaller tables?
 
It is unlikely your table is normalised as you say you have both customer details and information about what products they have bought. That sounds like three tables - Customer, Product and Customer-Product.

You can make the second form select the same record. I'll come back to you on that if you've not found it in help or someone else has not given you the details.

 
In your code for your shortcut buttons use a String Link Criteria:
DoCmd.OpenForm stDocName, , , [red]"[ID]=" & Me![ID][/red]

IF your table stores information concerning just the one entity, THEN there's no problem using the one table. If, on the other hand, you are storing information on different entities (as Mike wonders) then you should separate the tables and Normalise the database.
Cheers.
 
Thanks Guy's

I can't access the base at the moment, but as soon as i get a chance I will.

When I said the table stored customer detail, that wasn't quite correct, It only holds the customer Reference number, contact details are stored in a different table

Wayne
 
what you need is exactly as BNPMike said, three tables
table 1 contains customer information and customer id
table 2 contains customer id, product id and number ordered
table 3 contains product id and product data.

but if you are intent on having only one table why not use select queries as the data source of your subsequent forms that way only one record will show when you move to the next form.

Be ALERT - Your country needs Lerts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top