473,396 Members | 1,846 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,396 software developers and data experts.

Pulling record info from a tabular form in Access 2003

21
I may be brain-fried, but I could use some help again.

One of my glorious forms in my multi-form report thingiemajigger is a tabular form. For example, it shows customer items purchased and the price.

"Item1" "1.99"
"Item2" "2.99"

I'd like to pull that data into a single string from another form. But my variable assignment just keeps pulling the first item over and over.

Expand|Select|Wrap|Line Numbers
  1. Summary=[Forms]![MainForm]![Orderform].[Form]![ItemName] & " " & _
  2. [Forms]![MainForm]![Orderform].[Form]![ItemPrice]
  3.  
  4. Summary=Summary & ", " & _
  5. [Forms]![MainForm]![Orderform].[Form]![ItemName] & " " & _
  6. [Forms]![MainForm]![Orderform].[Form]![ItemPrice]
  7.  
This results in: "Item1 1.99, Item1 1.99,"

I know I'm missing a loop in here, but what am I looping? I tried an SQL statement that counted the results of the query the data is coming from, but that just made everything function slower and got me nowhere.

Please, save me from my own stupidity! :-)
Apr 26 '07 #1
1 1691
Lysander
344 Expert 100+
I may be brain-fried, but I could use some help again.

One of my glorious forms in my multi-form report thingiemajigger is a tabular form. For example, it shows customer items purchased and the price.

"Item1" "1.99"
"Item2" "2.99"

I'd like to pull that data into a single string from another form. But my variable assignment just keeps pulling the first item over and over.

Expand|Select|Wrap|Line Numbers
  1. Summary=[Forms]![MainForm]![Orderform].[Form]![ItemName] & " " & _
  2. [Forms]![MainForm]![Orderform].[Form]![ItemPrice]
  3.  
  4. Summary=Summary & ", " & _
  5. [Forms]![MainForm]![Orderform].[Form]![ItemName] & " " & _
  6. [Forms]![MainForm]![Orderform].[Form]![ItemPrice]
  7.  
This results in: "Item1 1.99, Item1 1.99,"

I know I'm missing a loop in here, but what am I looping? I tried an SQL statement that counted the results of the query the data is coming from, but that just made everything function slower and got me nowhere.

Please, save me from my own stupidity! :-)
I'm not sure if you can refer to the different rows on the form, as they all have the same control name. You can look at the forms recordset and then loop through that, as below, but I don't know how that will affect performance.
Expand|Select|Wrap|Line Numbers
  1. Dim rs As Recordset
  2. Set rs = Forms!TEST.Form.RecordsetClone
  3. While Not rs.EOF
  4. 'Do what you want to the record set
  5.     MsgBox rs![Cluster ID]
  6.     rs.MoveNext
  7. Wend
  8. rs.close
  9. set rs=nothing
  10.  
Apr 26 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Skully Matjas | last post by:
I am using the following code (created by the wizard) to allow to bring my form to a particular entery. But when I edit the entery (ex: put new information into a blank cell), it puts that record...
1
by: Skully Matjas | last post by:
Thank you for getting back to me. I am very new at this so i didnot understand what you said, here i will give as much cetails as possible: 1) The combo box i am using is combox39 2) I imported...
1
by: JHite | last post by:
I am using Access 2003. My Form has 4 fields: MailingListID, auto generated – primary key LastName FirstName NickName I used the Combo box wizard to set up look-up box on the form. I answered...
4
by: Leah Trahan | last post by:
I am new at Access, databases, AND posting threads (sorry). I have a subform that is a continuous form based on a tabular query. I enter a particular serial # (on the main form) and the subform...
11
by: kabradley | last post by:
Hello Everyone, So, thanks to nico's help I was finally able to 'finish' our companies access database. For the past week or so though,I have been designing forms that contain a subform and an...
3
by: getro | last post by:
Hi Everyone, I need to open an Access 2003 form to a specific record from a custom Outlook 2003 Appointment form. The form has a command button that would pass a record id to access and open the...
3
by: marcf | last post by:
Hi Everyone, Hopefully someone will be able to offer a suggestion to this problem. I have a multi user CMS running at work which I wrote. Aside from a few bugs everything has been going fine...
1
by: MerlinS | last post by:
Using Access 2003. I have a form and a subform. On the main form, one of the fields is a lost box, which lists line numbers ie 1, 2, 3 etc. Then the list box is clicked, the subform corresponding...
6
by: kfanarmy | last post by:
Hello; I am attempting to use a command button "Delete Current Assignment Record" on a form to delete a user-selected record from a table entitled "Registration" with Key field "Registration ID"....
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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...

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.