Auto-update rows in a view-based subform?

G

genericwmail

Hi,

I have a form and subform. The main form is a typical "order form",
and the subform shows the contents of the order. The datasource for
the subform is a View rather than a single table, since I need to
display data from more than one table. The SQL statement that
generates the View is:

SELECT [ORDER].OrderID, [ORDER-DETAIL].EbayNum,
AUCTION.Winner, LOT.LotNum, LOT.Description,
LOT.WarehouseLoc
FROM dbo.AUCTION INNER JOIN
dbo.[ORDER-DETAIL] ON
dbo.AUCTION.EbayNum = dbo.[ORDER-DETAIL].EbayNum INNER JOIN
dbo.[ORDER] ON
dbo.[ORDER-DETAIL].OrderID = dbo.[ORDER].OrderID INNER JOIN
dbo.LOT ON dbo.AUCTION.LotNum = dbo.LOT.LotNum

In the subform, users see the auction items that are associated with
the order that is being viewed in the main form. I would like for
users to be able to add auctions to an order by entering an EbayNum
directly into the subform datasheet, and having the remaining data
(LotNum, Description, Location) fill in automatically. I also expect
that, when this happens, a new record is being created in the
ORDER-DETAIL table (tblORDER-DETAIL, OrderID, EbayNum) using the
EbayNum supplied by the user and the OrderID of the current order on
the main form. Can these two things be done when the datasource for
the subform is a View rather than a single table?

Note: The View was created in SQL, not in Access.

Thanks in advance! Looking forward to a quick solution, since I'm at a
standstill on my project...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top