I am moving away from macros etc into the exciting new world of VBA but being self taught I am struggling with some of the basics for now.
I have routines that open tables and move through the records which work perfectly well such as
Set db = CurrentDb
Set rst = db.OpenRecordset("tblproperties")
rst.MoveFirst
thisun = 0
thatun = 0
Do While rst.EOF = False
etc etc
I understand that it is possible to open a query as a recordset in the same way and use it in the same manner but I am having problems getting it to work
Set rst = db.OpenRecordset("QueryProperties")etc etc
Any assistance truly appreciated. Incidentally can anybody recommend a good reference book that aims at a reader somewhere between the levels of Computer Professor and a cabbage?
I have routines that open tables and move through the records which work perfectly well such as
Set db = CurrentDb
Set rst = db.OpenRecordset("tblproperties")
rst.MoveFirst
thisun = 0
thatun = 0
Do While rst.EOF = False
etc etc
I understand that it is possible to open a query as a recordset in the same way and use it in the same manner but I am having problems getting it to work
Set rst = db.OpenRecordset("QueryProperties")etc etc
Any assistance truly appreciated. Incidentally can anybody recommend a good reference book that aims at a reader somewhere between the levels of Computer Professor and a cabbage?