selecting the last tiem in a listview control

  • Thread starter Thread starter Ricky A.
  • Start date Start date
Hi Ricky:

I work with Access 2000, but this should also work with Access XP-

Private Sub Command2_Click()
Dim dbs As Database, rst As Recordset, strSQL As String
Set dbs = CurrentDb
strSQL = "SELECT [ACCOUNTS].[ACCT], [ACCOUNTS].[DATEPOSTED] FROM
[ACCOUNTS];"
Set rst = dbs.OpenRecordset(strSQL)
With rst
.MoveLast
List0.Value = ![ACCT]
.Close
End With
End Sub

Regards,
Al
 
Back
Top