Solved

ADO Get data from last populated record

Posted on 2006-06-09
4
156 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
  • 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

708 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