Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ADO Get data from last populated record

Posted on 2006-06-09
4
Medium Priority
?
166 Views
Last Modified: 2010-04-30
Hi,

I'm using DAO to connect to an access database. The DB populates a DataGrid.

How do I to retrieve the data from the last populated record. Eg if my records and fiels are populated as below, I would want to return either dd  from the A1 record. The columns will be populated with a varying amount of data...

Thanks, Dave.

A1   A2 etc etc
aa   zz
bb   xx
cc   gg
dd  hh

0
Comment
Question by:wildarmsdave
[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
  • 3
4 Comments
 

Author Comment

by:wildarmsdave
ID: 16870507
I don't have Vb to hand at the moment. Could I use the recordset.move last to go to the last record and then then recordset.absoluteposition to determine what position the cell is and get the data from it. There must be an easier way surely?
0
 

Author Comment

by:wildarmsdave
ID: 16884508
Hmmm. This partialy works but returns the whole record, not specific fields..

ARecordset.MoveLast

MsgBox ARecordset.GetString
0
 

Author Comment

by:wildarmsdave
ID: 16890249

Got it! This seems to do what I want...

ARecordset.MoveLast
MsgBox (ARecordset.Fields("a1"))
0
 

Accepted Solution

by:
EE_AutoDeleter earned 0 total points
ID: 17026699
wildarmsdave,
Because you have presented a solution to your own problem which may be helpful to future searches, this question is now PAQed and your points have been refunded.

EE_AutoDeleter
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

610 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