Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Subform of 2-table View: Make record in 3rd table?

Author  Topic 

whill96205
Starting Member

46 Posts

Posted - 2004-07-20 : 12:33:25
I'm trying to find a practical way to do the following, in an Access Data Project.

I have the following tables related to my question:
[AUCTION] AuctionID, EndDate, Winner
[LOT] LotNum, Description, Warehouse Location, AuctionID
[ORDER-DETAIL] AuctionID, OrderID

I have a shipping order form with a subform. The subform data source is an Access View which combines AuctionID from the AUCTION table, and Description and Warehouse Location from the LOT table. Naturally, when viewing the order form, the subform is intended to display which AUCTIONs/LOTs are associated with that order, and this is accomplished in SQL by joining across the ORDER-DETAIL table.

I want the users to be able to add an AUCTION to an existing order directly in the subform. Because the subform data source is a view, however, there seem to be some complications. Remember that the view is the result of a query against the AUCTION and LOT table, with AUCTION designated as the Unique Table. If a user enters an AuctionID manually into the next row of the subform, I want a new record to be created IN THE ORDER-DETAILS TABLE -- that's it. Is this possible? (Built-in constraint is that the AuctionID must already exist in the AUCTION table.)

--Whill
   

- Advertisement -