Solved

DataTable Column/Row Reference

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now