Solved

DataTable Column/Row Reference

Posted on 2009-05-05
4
394 Views
Last Modified: 2013-11-27
I have a MS Access 2003 query that returns 2 columns and 4 rows, based on the tableadapter parameter in my VB2005 program. I need to have:

textbox1.text = column1, row1
textbox2.text = column2, row1
textbox3.text = column1, row2
textbox4.text = column2, row2
etc. thru
textbox8.text = column2, row4

What is the proper way to reference the data in the table to fill the textboxes?
0
Comment
Question by:Tim313
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 44

Accepted Solution

by:
GRayL earned 250 total points
ID: 24304926
A relational database does not work that way.  If you want to be able to refer to the return by row and column, then make the query the record source for a combo box or a list box.  You can refer to the values by:

myVal=Me!cboName.column(c,r)

Where r and c are zero-based rows and columns
0
 
LVL 20

Expert Comment

by:clarkscott
ID: 24305532
You have to SORT the recordset how you wish to view the data.
Scott C
0
 

Author Closing Comment

by:Tim313
ID: 31578025
Did not use the solution, but kept it for future reference....
0
 
LVL 44

Expert Comment

by:GRayL
ID: 24576782
Thanks, glad to help.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question