Re: Crosstab query error 3104



Hi again

I've now gone thorugh all 250 or so forms / reports & modules & added Option
Explicit wherever it was missing! Thankfully very few compile errors had to
be fixed though there are lots of places where I need to redefine variables
correctly (as in your previous post).

I also found the Editor Options in VB & yes it was already checked - pity it
doesn't work retrospectively!

I have both DAO & ADO references checked but DAO is higher so it is taking
precedence. My understanding was that was the correct order..am I wrong on
this?


"Douglas J. Steele" wrote:

"ridders" <ridders@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:733108FA-15BB-47AC-B057-FCA1B2E09C6A@xxxxxxxxxxxxxxxx
Hi Doug

Thanks - I inherited the original database & am gradually working through
&
fixing errors. I had wondered if such shortcuts were OK. As they seem to
work
i've never changed them.
Presumably fixing all such issues should make the database faster / more
reliable

More reliable, yes. I doubt it will make any difference in speed (and if it
does, it'll be so slight you'd never notice it).

Second,
"Recordset" exists as an object in more than one library (both DAO and
ADO).
Since you're using DAO, you really should use:

Dim rst As DAO.Recordset, rst2 As DAO.Recordset

Again should this improve the performance of the database?

If it's working, then perhaps you've removed the reference to ADO. If you
were to copy the code into another database where you hadn't deleted the
reference to ADO, you'd find that the code wouldn't work, since ADO is
higher in the order than DAO so takes precedence.

I'm using Access 2003 & don't have a Module tab in Tools ¦ Options.
Can I enforce this in some other way in Access 2003?

Sorry, the name of the tab is Editor in Access 2003 (and you have to be in
the VB Editor when selecting Tools | Options)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)




.



Relevant Pages

  • Re: Knowledge Base Help Not working
    ... Database is a DAO object. ... both Access 2000 and 2002 use ADO. ... Microsoft DAO 3.6 Object Library, ... For example, to ensure that you get a DAO recordset, you'll need to ...
    (microsoft.public.access.formscoding)
  • Re: ADO and the Find method
    ... You cannot compare DAO and ADO. ... database, which has OLEDB provider. ... >>>> Opening of the whole table was not a good design anytime. ...
    (microsoft.public.vb.database.ado)
  • Re: How do I use ADO in VC++ 6.0 to get the columns names of the t
    ... you're using DAO rather than ADO ... (ActiveX Database Objects). ... robust library for working with Jet databases. ...
    (microsoft.public.data.ado)
  • Re: Database variable change from 97 to 2003
    ... Access 2003 has references set to both DAO ... and ADO and, perhaps unfortunately, the ADO reference is set higher in ... use Dim rcd As ADODB.Recordset) ... > modules, however, I get errors on the database variable ...
    (microsoft.public.access.modulesdaovba)
  • Re: DAO to ADO
    ... I will probably reinstate the DAO version of my Access DB. ... I never get an error executing ADO code. ... >you don't get compile errors, ... >> reference and I replaced it with the ADO library. ...
    (microsoft.public.access.modulesdaovba)

Quantcast