I'm currently working on a small custom database for some specialized auctions. The auctioneer may sell one, or multiple items at a single price. In fact, during the middle of bidding, he may add items to the currently in progress auction lot to get the price up.
My database is setup to handle this part of the process using 3 tables.
Auctions_Lots
--LotID Autonumber; PK
--AuctionID
--Price
Auctions_Lots_Items
--LotID PK
--ItemCode PK
--Quantity
Auctions_Lots_Buyers
--LotID PK
--BidderID PK
--Quantity
When the auction is happening, the user needs to be able to input the data quickly from one single form. Then the user needs to be able to start the next lot, etc without changing forms. I have this built. I have one master form that uses the Auctions_Lots table and two child subforms that use the Auctions_Lots_Buyers and Auctions_Lots_Items tables. These link to the Auctions_Lots table using the LotID field.
When the user loads the form, it automatically sets it to add record mode for the master form. I have the three fields from Auctions_Lots on the form and the Price field defaults to 0. Problem is, I can't get it to populate the LotID field automatically when the form loads. The user MUST manually enter a price to get it to generate the autonumber for that field. Unless they do, they can't enter data into the other subforms as the subforms don't know what value to set the LotID field to.
I have tried using DOCMD.Save or Me.Refresh to save the record using the $0 value when the form opens, activates, etc and can't figure it out. Any advice would be greatly appreciated.
Thanks,
Chris
Start Free Trial