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

Populate fields of multiple tables w/ primary key of main table

Status
Not open for further replies.

pwinters

Programmer
Sep 12, 2002
34
I'm using java to make a web front-end of an Access 97 db.

I currently have one main table with 4 linked tables. What I want is...

When the user adds a new project to the Main table, I want the project_id (autonum primary key of main table) to be sent to the other 4 tables. This will then be used to update these 4 tables based on a selected project.

The problem I see so far is that the project_id is not created until the user hits the submit button to create a new record. Therefore, I'm not sure how to get this field into the 4 tables.

Any ideas?

I'd appreciate any assistance.
Thanks
 
How about two separate forms, the first one creating the project number, then moving to a new page (which would input the number into the database tables) which would be ready to receive data for that number?
 
I think that's a good start, but...

From the 2nd form, I think I'll need to access the main table to get the project number (autonum) assigned. Then, I'd insert this number into all the other tables... But, there isn't anything to distinguish that it's a new project, rather than one already in the main table.
Any ideas?

THANKS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top