Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 168
  • Last Modified:

ADO Get data from last populated record

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
wildarmsdave
Asked:
wildarmsdave
  • 3
1 Solution
 
wildarmsdaveAuthor Commented:
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
 
wildarmsdaveAuthor Commented:
Hmmm. This partialy works but returns the whole record, not specific fields..

ARecordset.MoveLast

MsgBox ARecordset.GetString
0
 
wildarmsdaveAuthor Commented:

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

ARecordset.MoveLast
MsgBox (ARecordset.Fields("a1"))
0
 
EE_AutoDeleterCommented:
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now