I’ve had some exposure to VBA and know the Access Interface very well (Microsoft Certified). I purchased MS Access 2007 Programming By Example by Julitta Korol a couple of months ago and all of the hands-on examples display the results in the Immediate window or a msgBox. Although I was able to figure out how to display the results of a procedure in an unbound text box on a form, I just can’t figure out how to get the results of a recordset into fields in a table. Can you help with the following DAO code explaining a step-by-step process?
Sub ReadFromEnd()
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = OpenDatabase("C:Acc07_ByExampleNorthwind 2007.accdb")
Set rst = db.OpenRecordset("Customers", dbOpenTable)
rst.MoveLast
Do Until rst.BOF 'Beginning of File
Debug.Print rst!Company
rst.MovePrevious
Loop
SendKeys "^g" 'send to Immediate window
rst.Close
Set rst = Nothing
db.Close
Set db = Nothing
End Sub
Software/Hardware used:
ASKED:
July 17, 2008 4:44 PM
UPDATED:
August 30, 2008 2:22 AM