Hi!
I have a problem with the following code (behind a button on
frmOrders):
(structure: frmOrders->frmOrderdetails (form with subform))
strPutBack = "INSERT INTO
tblAmountItems(ItemID,Amount,MyDate,Returned) " _
& "SELECT ItemID,Amount,MyDate,Returned " _
& "FROM tblOrderdetails " _
& "WHERE tblOrderdetails.ItemID = " &
Forms!frmOrders!frmOrderdetails!ItemID _
& "AND tblOrderdetails.OrderID = " & Forms!frmOrders!OrderID
& "AND tblOrderdetails.Returned = True;"
This returns items from a subtable (tblOrderdetails) back to
tblAmountItems,
which is a subtable to tblItems.
With only one row returned it'll work fine. However, if there are two
or more
rows to return, only the first row picked (through a checkbox) will be
returned.
I guess it is necessary to cycle through the orderlines in order to
'capture' all
rows that are checked?
Haven't found any material that covers how to access rows in a subform.
Have you?
:-)
Me.Name
Geir Smevig-Baardsen
MCP
http://www.geirb.info
*******************
*Don't reply to my
*email.
*Reply to group
*:-)
*
*
*******************