By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,960 Members | 2,238 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,960 IT Pros & Developers. It's quick & easy.

Accessing rows on a subform?

P: n/a

I have a problem with the following code (behind a button on

(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
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

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?



Geir Smevig-Baardsen
*Don't reply to my
*Reply to group

Jun 28 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.