Forms and autonumbers?????

paulmcdonnell

Ready to Help
Local time
Today, 11:48
Joined
Apr 11, 2001
Messages
167
I have a master dataset which has other smaller datasets added to it. Each item in the data set needs a unique ref. I use auto number in the main data set and use a small form for people to create other datasets. The problem that I'm having is linking the two datasets so that they both have unique IDs which match so that when the smaller datasets are added to the main dataset it simply 'bolts' on with no cinflicts
 
I am assuming that by 'dataset' you mean a table....

Sounds to me like you want a One to Many relationship between these two tables and a Form/Subform in which to enter data. Your Main table will have a Primary key which will be the Foreign key in the subform or Many table. The Many table can also have a autonumber field so it will have unique records as well as records related to the One table.

Create your Main form based on Your 'Master dataset'. Create a form (usually datasheet view) from the 'small dataset'. In the relationship window join the Primary key of the Master table to the Foreign key of the other table. Go back to you main form and use the Wizard to add the subform to your Main form. Access will create the links for you. Now you can select a record from the Master table and add as many new records in the other table and they will be properly related and 'linked'.

[This message has been edited by Jack Cowley (edited 07-11-2001).]
 

Users who are viewing this thread

Back
Top Bottom