Doc
Don't know if you will get to read this but can anyone help?
Doc gave me an explanation re referring to a table using VBA...tat helped to clarify things a little more.
I tried out the example using Northwinds.mdb, came up with a "funtion undefined" error, read up on that and then loaded in a Data Access Objects (so THAT's what a DAO is!!) library.
Great - VBA is talking to me about recordsets so I can refer to them.
BUT
Apparently the recordsets collection is a member of the database class so, logically, shouldn't I be able to refer to the Database that holds the recordset? Sure I can use OpenDatabase but my Database is already open so I get an error message.
I thought I had Objects, Methos and Properties figured out after a lot of self teaching but I'm baffled...if you look at the help file then the recordsets collection is held in the database. I can declare both a database and recordset but I can't do this;
sub test()
dim fred AS Database
dim fred2 AS Recordset
fred="OO1.mdb"
with fred
set fred2=.OpenRecordset("tblTable".dbOpenTable)
end with
end sub
...and I get an error message highlighting "fred=" saying invalid use of property.
but...if "fred" is declared as a database then shouldn't I be able to set it's value as "OO1.mdb" is a genuine database?
A
