L
Laurel
The following code is from a posting in
the ...access.forms section of this forum, by Van Dinh -
Nov 17, 2003.
Dim db As DAO.Database
Dim qdf As Dao.QueryDef
....
Set db = DBEngine(0)(0)
Set qdf = db.QueryDefs(GRAPH_QCUSTOME) (a string
containing a form name.)
etc.
My problem is that I can't find any syntax that works in
my environment. I've put off really understanding DAO vs
ADO as long as I could, and now I find that the HELP is
just confusing. I don't even really know what I'm using.
Sometimes I think I've pinned it down, and then someone
says something that puts me in confusion again.
Could someone...
1 - Give me syntax for this little bit of code that might
work for me so I can get on with my project. I need to
reference and modify the SQL of a form that is not yet
open.
2 - Give me some pointers for sorting this out beyond
recommending HELP articles (I do believe I've read them
all... or all that I could find.)
Here are clues to my current environment.
- I'm running Access 2000.
- I'm using a mdb, not a "project"
- If I use Option Explicit, the two DIMs cause a runtime
error "User defined type not defined"
- If I turn off Option Explicit, the statement "Set db =
DBEngine(0)(0) stops returning an error, but the variable
in the "locals" window won't expand.
(I have no idea what the 0, 0 are... no clue in HELP
again.)
the ...access.forms section of this forum, by Van Dinh -
Nov 17, 2003.
Dim db As DAO.Database
Dim qdf As Dao.QueryDef
....
Set db = DBEngine(0)(0)
Set qdf = db.QueryDefs(GRAPH_QCUSTOME) (a string
containing a form name.)
etc.
My problem is that I can't find any syntax that works in
my environment. I've put off really understanding DAO vs
ADO as long as I could, and now I find that the HELP is
just confusing. I don't even really know what I'm using.
Sometimes I think I've pinned it down, and then someone
says something that puts me in confusion again.
Could someone...
1 - Give me syntax for this little bit of code that might
work for me so I can get on with my project. I need to
reference and modify the SQL of a form that is not yet
open.
2 - Give me some pointers for sorting this out beyond
recommending HELP articles (I do believe I've read them
all... or all that I could find.)
Here are clues to my current environment.
- I'm running Access 2000.
- I'm using a mdb, not a "project"
- If I use Option Explicit, the two DIMs cause a runtime
error "User defined type not defined"
- If I turn off Option Explicit, the statement "Set db =
DBEngine(0)(0) stops returning an error, but the variable
in the "locals" window won't expand.
(I have no idea what the 0, 0 are... no clue in HELP
again.)