Re: New Info on Stupid Error I'm not Seeing

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Cheryl Fischer (cherylfischer_at_NOSPAMmsn.com)
Date: 03/18/04


Date: Thu, 18 Mar 2004 08:16:02 -0600


> I want to do away with DAO altogether because in Access 2003, it
> must be manually referenced

Access 2003 *does* include a default reference set to DAO.

--
Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX
"TKD Karen" <kstern@alittlehelp.net> wrote in message
news:Tdf6c.35763$KB.27015@twister.nyroc.rr.com...
> You didn't answer my question.  I want to use ADO not DAO.  I appreciate
the
> effort, but please read what I am looking to do.  ADO does not recognize
> querydef.  I want to do away with DAO altogether because in Access 2003,
it
> must be manually referenced and some of the databases I use require DAO2.5
> (openquerydef) which is no longer available so I want to be consistent in
my
> programming.  What I meant when I referred to VBA was that the SQL
statement
> was written in my code as opposed to an Access Query Design.
> Karen
>
> "TC" <a@b.c.d> wrote in message news:1079602654.170471@teuthos...
> > Queries are written in SQL, not ADO or VBA.
> >
> > To change the SQL of a stored query using DAO:
> >
> > (untested)
> >
> > dim db as database, qd as querydef
> > set db = currentdb()
> > set qd = db.querydefs![My Stored Query]
> > qd.sql = ...
> > set qd = nothing
> > set db = nothing
> >
> > Doubtless there is something similar in ADO.
> >
> > HTH,
> > TC
> >
> >
> > "TKD Karen" <kstern@alittlehelp.net> wrote in message
> > news:FZ76c.34731$KB.696@twister.nyroc.rr.com...
> > > I was having trouble with an ADO function that was creating a
recordset
> > > based on a query.  I now understand that it was really the query that
> was
> > > the problem.  The query is supposed to be rewritten using ADO in VBA
> > > (Access2000 soon to be upgraded to 2003) but it doesn't recognize the
> > > wildcard '*'.  I learned to use '%' instead with the word 'ALike'
> instead
> > of
> > > 'Like' but when I tried to run it, I got booted out of A2k.  The DAO
> code
> > > works for this type of query:
> > >  SELECT * FROM tblWhatever WHERE CurrentStatus Like 'Admin*'
> > >
> > > Any suggestions how I would save this sqlString to an existing query
> named
> > > qrySomeQuery?
> > > Thanks!
> > > --
> > > Karen Stern
> > > A Little Help Computer Services, LLC
> > > www.alittlehelp.net
> > > kstern@alittlehelp.net
> > > 518-885-4549
> > >      Everyone Needs A Little Help!
> > >
> > >
> >
> >
>
>


Relevant Pages

  • Re: Running a query to check data entry
    ... The default version for Access 2000 or less is DAO. ... For ADO, make ... Set rst = New Recordset ... > run a query to find the Latest one. ...
    (microsoft.public.access.formscoding)
  • Re: Create View, Index
    ... Some of these depend on the library you use to execute the query, i.e. they might work only if executed under ADO (not DAO.) ... Here's an exmaple of how to create a view with ADO: ...
    (microsoft.public.access.queries)
  • Re: CREATE TABLE...
    ... without changing setting) the Access Query designer uses ... DAO instead of ADO and thus, has the same problem than DAO on some ... Is there any way to just do it using query, ie, just CREATE TABLE... ...
    (microsoft.public.access.queries)
  • Re: Auto-select next record alphabetically
    ... I've already got a query setup that selects the ... >that I'm not up to snuff with recordset programming yet. ... As for DAO vs. ADO, if you using the Jet database engine (or ...
    (microsoft.public.access.formscoding)
  • Re: How to enforce subtypes/supertypes in Access 2000?
    ... DAO is the native object model for Jet databases and, as such, is the ... ever need ADO. ... Private Sub SetContactType() ...
    (microsoft.public.access.tablesdbdesign)