Creating a second key number field for a form

WinDancer

Registered User.
Local time
Yesterday, 19:14
Joined
Oct 29, 2004
Messages
290
I just finished a customer demo of a new application.

My customers asked me to build another form reached by clicking a command button on the main form.

The two forms (and underlying tables) are tied via a tracking number (autonumber) field.

They are planning on generating notes on this second form, sometimes many for a single tracking number.

They would like to have these notes ID'd by a sequence number, ie:
Tracking Number = 100, sequence # 1
Tracking Number = 100, sequence # 2
Tracking Number = 100, sequence # 3

These sequence numbers need to start at 1 for each tracking ID-

Is there a simple way to do this?

Thanks,
Dave
 
I think you would need another table for the Sequence part.

something like this

first table:
TrackingID Trackingdata Trackinddata2

Second table:
SequenceID, TrackingID, Sequenceinfo....

Then create a form for the tracking information
and put a subform on that form for the sequence information.

You bound the subform based on the TrackingID as a foreign key.

Access will do this automatically when you drag a subform to the main form and tell it which table/query to pull the information from.
You can also use the form wizard, which will give you the option to link via a button to another form.

This way when you run a query for all the records related to "Tracking Number = 100" you'll have all the sequences associated with the main record.

Make Sense?
Did I miss understand the question?


Larry
 
Last edited:
I think you understood the question. Now I will go to work and see if I understood your answer :)
Thanks,
Dave
 

Users who are viewing this thread

Back
Top Bottom