-
i keep trying to write the same damn thing and something is not working here...
in decl... i have
global db as database
global rc as recordset
right and in my code i have
set db = DBEngine.OpenDatabase("C:\somefile.mdb")
set rc = db.openrecordset("main")
' which is the table i want to look at
now i use the recordset once right... and then i try to access it again in another function and get an object error. object invalid or no longer set... now what does this mean?
-
Everytime you open a recordset for example:
*Database already declared
Public sql as string
Public rc as Recordset
sql = "SELECT * FROM Table WHERE ......."
set rc = mdb.openrecordset(sql)
With rc
********************
********************
End with
*Important
rc.close
Always remember to close your recordset especially when you
use a global recordset.
Joffies