473,406 Members | 2,894 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Accessing rows on a subform?

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
*:-)
*
*
*******************

Jun 28 '06 #1
0 1223

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: George Grodentzik | last post by:
I created a typed dataset from which I am trying to access the data. When I use the following code to access a row string name =dataset.person.firstName I receive an error...
4
by: Laura | last post by:
Here's the situation: I'm trying to use an update query to copy data from one row to another. Here is the situation: I have 5 companies that are linked to each other. I need to show all 5...
0
by: Bobby | last post by:
Hello, I've a table 'A' with a reference to another table 'B'. I've created a form with A's fields, and a subform that displays B's fields, with a link between them in the subform properties...
1
by: fecket | last post by:
I have a subform which is a continous form and displays the content of a table, with a subjext number, then a line of text, then a score. I have used an option group to update the score as...
3
by: Steven | last post by:
OK.. Here's my situation. I have a subform on a parent form. When the parent form is loaded, the subreport queries data from a table in the DB. The parent form has a couple of text boxes for data...
8
by: colmkav | last post by:
Hi, could someone tell me how I can check whether a database is open by name eg something like db("mydbname")
1
by: pdesh3 | last post by:
I have created a form where one text box and two command buttons named Search and Clear are present. Under all these fields I am also including a subform which displays all the values stored in...
0
by: HumanJHawkins | last post by:
Hi all, I read other posts on this, but they offered alternate solutions... I am looking for how to simply do this: If I have a form with a subform in it, how can I programatically access the...
7
by: robtyketto | last post by:
Greetings, I have a main form. Upon filling in a combo box it then displays a subform (based on a query that uses values in the combo box on where clause) THe subform has the paramater Data...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.