Solved

DataTable Column/Row Reference

Posted on 2009-05-05
4
395 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

719 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