E
Ennex
Thank you to Doug Steele for attempting to solve my problem posted on Feb 6.
I tried his procedures and read some other stuff on references on his and
other sites. My module still doesn't run without errors. Here are where
things stand: (I'm using Access 2003 under Win XP Pro on a Dell Inspiron
600m.)
When I started on Doug's procedures, there were five references selected.
Two were not able to be unselected (VBA and MS Access 11.0 object library).
The others were:
-- OLE automation
-- utility
-- Microsoft Visual Basic for Applications Extensibility 5.3
From Allen Browne's site, I see that there are two other references that I
might need:
-- Microsoft DAO 3.6 Object Library (called below "DAO")
-- Microsoft ActiveX Data Objects 2.8 Library ("ADO")
In Doug's procedure to unselect all the references that I could, when I came
back, "utility" was no longer in the list. I have never seen it since.
I've been testing the other refs to see what combination might work. I have
a test query that only calls ztemp(), which is defined by "Function ztemp() /
ztemp = 0 / End Function". My original problem is that this query yields
"Compile error. in query expression 'ztemp()'."
I found that this compile error was eliminated by selecting DAO, either
alone or in combination with any of the other refs. However, when DAO is
selected, either alone or with any of the others, there is a worse problem:
When I go back to my database, it won't run, but dumps me in the debugger
with "Compile error: User-defined type not defined" on a statement of the
form "Dim ____ As Table". The data type "Table" is not my own, but this code
used to work when I developed it some years ago in an earlier version of
Access.
When I try to compile the module directly, if no optional refs are selected,
I get the same data type error on a statement of the form "Dim _____ As
Database". When DAO is selected, I get it instead on an "As Dynaset" clause.
And I see that selecting DAO puts a "Database" in the Object Browser. But
selecting all of DAO, ADO, OLE automation, and VBA Extensibility does not put
"Dynaset" or "Table" in the Object Browser.
Since I thought I might have corrupted something, I tried first repairing
the Office installation and then uninstalling and reinstalling Access. But
when I started Access up again, the refs selection had not changed and
"utility" was still not in the list.
So I wonder:
-- Are data types "Table" and "Dynaset" eliminated in recent VBA
versions?
-- Were they defined in the "utility" reference that I seem to have lost?
-- Or is there something else wrong with my reference selections?
I tried installing Terry Kreft's References Wizard, but the Add-In manager
said it was written for an earlier version of Access and would not install it.
So I seem to have made some progress, but am stuck again. Can anyone tell me
what I need to do (or try) in order to get this module running? Thanks for
your help!
Regards,
Marshall Burns
www.Ennex.com
I tried his procedures and read some other stuff on references on his and
other sites. My module still doesn't run without errors. Here are where
things stand: (I'm using Access 2003 under Win XP Pro on a Dell Inspiron
600m.)
When I started on Doug's procedures, there were five references selected.
Two were not able to be unselected (VBA and MS Access 11.0 object library).
The others were:
-- OLE automation
-- utility
-- Microsoft Visual Basic for Applications Extensibility 5.3
From Allen Browne's site, I see that there are two other references that I
might need:
-- Microsoft DAO 3.6 Object Library (called below "DAO")
-- Microsoft ActiveX Data Objects 2.8 Library ("ADO")
In Doug's procedure to unselect all the references that I could, when I came
back, "utility" was no longer in the list. I have never seen it since.
I've been testing the other refs to see what combination might work. I have
a test query that only calls ztemp(), which is defined by "Function ztemp() /
ztemp = 0 / End Function". My original problem is that this query yields
"Compile error. in query expression 'ztemp()'."
I found that this compile error was eliminated by selecting DAO, either
alone or in combination with any of the other refs. However, when DAO is
selected, either alone or with any of the others, there is a worse problem:
When I go back to my database, it won't run, but dumps me in the debugger
with "Compile error: User-defined type not defined" on a statement of the
form "Dim ____ As Table". The data type "Table" is not my own, but this code
used to work when I developed it some years ago in an earlier version of
Access.
When I try to compile the module directly, if no optional refs are selected,
I get the same data type error on a statement of the form "Dim _____ As
Database". When DAO is selected, I get it instead on an "As Dynaset" clause.
And I see that selecting DAO puts a "Database" in the Object Browser. But
selecting all of DAO, ADO, OLE automation, and VBA Extensibility does not put
"Dynaset" or "Table" in the Object Browser.
Since I thought I might have corrupted something, I tried first repairing
the Office installation and then uninstalling and reinstalling Access. But
when I started Access up again, the refs selection had not changed and
"utility" was still not in the list.
So I wonder:
-- Are data types "Table" and "Dynaset" eliminated in recent VBA
versions?
-- Were they defined in the "utility" reference that I seem to have lost?
-- Or is there something else wrong with my reference selections?
I tried installing Terry Kreft's References Wizard, but the Add-In manager
said it was written for an earlier version of Access and would not install it.
So I seem to have made some progress, but am stuck again. Can anyone tell me
what I need to do (or try) in order to get this module running? Thanks for
your help!
Regards,
Marshall Burns
www.Ennex.com