473,668 Members | 2,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Accessing rows on a subform?

Hi!

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

(structure: frmOrders->frmOrderdetail s (form with subform))

strPutBack = "INSERT INTO
tblAmountItems( ItemID,Amount,M yDate,Returned) " _
& "SELECT ItemID,Amount,M yDate,Returned " _
& "FROM tblOrderdetails " _
& "WHERE tblOrderdetails .ItemID = " &
Forms!frmOrders !frmOrderdetail s!ItemID _
& "AND tblOrderdetails .OrderID = " & Forms!frmOrders !OrderID
& "AND tblOrderdetails .Returned = True;"

This returns items from a subtable (tblOrderdetail s) 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 1239

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

Similar topics

2
2248
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 System.IndexOutOfRangeException as if there are no rows. Yet when I dump the data to a file I receive (sample of file) <?xml version="1.0" standalone="yes"?><Dataset1 xmlns="http://tempuri.org/Dataset1.xsd"><Table><accountNo>1</accountNo><firstName>John ...
4
2273
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 companies on a form. 3 of the companies have common employees. I have a table that looks like this:
0
1202
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 (Master: Bref, Child: ID). This allows the user of the form to see and edit the fields in B, but if I want to add a new row, I get the 'You can't assign a value to this object' message (due to the link).
1
1642
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 0,2,4,6,8,10 When entering the data it is a bit difficult to keep track of where you are, as you are transferring data from hard copy. Is there a way to allocate a background colour to individual rows of the subform to give an overall colour for each...
3
1620
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 entry. A command button on the parent form inserts that data from the text boxes into the database... The subreport is then supposed to requery and show the previous information as well as the just inserted information.
8
2178
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
11430
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 Patient table. When I enter any word in the name text box and click enter then the values in sub form only display the details of the patient whose first name or last name matches with the given name. When button Clear is hit ( in future I am planning...
0
847
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 dataset in the subform from the main form. For example: The main form is named Form_Main, and has an edit box called "Hello_World" The subform has an edit box called "Hello_Echo"
7
6575
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 Entry = 'No' as I want users to see all existing records and all additions/deletions and edits. However I want to move to the last record to default, allowing the user to add a record without navigating themselves to the last record. A popular...
0
8382
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8802
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7405
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6209
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4384
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2792
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1787
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.