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!

Header/Detail primary key links

Status
Not open for further replies.

wgg

Programmer
Apr 25, 2001
47
BB
Hi there,

I am a new user to MS Access. I'm designing a table to store bid-header information and bid-details information. I see Access has an autonumber field type. The key field in bid-header is bid_id and I want it to be an autonumber. Provided I want to create a form that collects both bid-header and bid-details information, does the bid_id in bid_details carry the same autonumber that links to the bid table?

Thank you in advance.

wgg
 
For me, the bid_details table should have a Long field as a ForeignKey referencing bid-header.bid_id

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
So your table layout would be like:

tblBidHeader
-------------
BidID autonumber, PK
BidNo
Etc...

tblBidDetail
-------------
BidDetailID, autonumber, PK
BidID, Long Integer, FK
BidDetailDate
BidDetalPrice
etc....

Create relationship between PK and FK

Pampers [afro]
Keeping it simple can be complicated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top