Re: Running queries with VBA functions in external database

From: Sergey Poberezovskiy (anonymous_at_discussions.microsoft.com)
Date: 08/11/04

  • Next message: Patty O'Dors: "Re: default constraint"
    Date: Wed, 11 Aug 2004 00:48:53 -0700
    
    

    Originally I was running without setting the warnings off
    with the same result. But I thought as if you are trying
    to execute DoCmd.OpenQuery actionQueryName in the same
    database - it comes up with a confirmation, so I tried to
    turn them off through Automation, just in case. They do
    not seem to make any difference.

    Any other ideas???

    >-----Original Message-----
    >Set warnings True and see what it is telling you!
    >
    >(david)
    >
    >"Sergey Poberezovskiy"
    <anonymous@discussions.microsoft.com> wrote in
    >message news:3daa01c47f34$8841ff30$a601280a@phx.gbl...
    >> Hi,
    >>
    >> I have an (update) query that utilizes my Custom VBA
    >> function (BitAnd). I need to run this query from within
    >> another database. The code (attached below) runs without
    >> errors, but records do not update.
    >> On another hand, when I step thru the code line by line,
    >> everything seems to work just fine.
    >> Could anyone please help?!!
    >>
    >> The code:
    >>
    >> Dim oAccess As Access.Application
    >> Set oAccess = New Access.Application
    >> oAccess.OpenCurrentDatabase vsDatabase
    >> With oAccess.DoCmd
    >> .SetWarnings False
    >> .OpenQuery "qryUpdateTempScores"
    >> End With
    >> oAccess.CloseCurrentDatabase
    >>
    >> Any help is greatly appreciated.
    >
    >
    >.
    >


  • Next message: Patty O'Dors: "Re: default constraint"

    Relevant Pages

    • Re: Access 2000 Make Table Query Warning Box -- use currentdb.exec
      ... that it effects the entire database? ... When this query is run, and before it asks the user for the input, I ... I have restarted the program multiple times. ... but the warnings keep coming up. ...
      (microsoft.public.access.queries)
    • Re: changed queries save automatically
      ... Check out Allen Browne's "bug" about Name AutoCorrect. ... A query not prompting you about saving it is one of the symptoms of this ... Either something else is turning off warnings or we're dealing with a bug ... Compacting and repairing closes the database and reopens it. ...
      (microsoft.public.access.queries)
    • Re: changed queries save automatically
      ... Not exactly a "tiny" bug is it? ... A query not prompting you about saving it is one of the symptoms of this ... macro or code someone has Set Warnings to Off but forgot to Set ... Compacting and repairing closes the database and reopens it. ...
      (microsoft.public.access.queries)
    • Re: append queries
      ... If this is Access 97 or before the database size is limited to 1 gigabyte. ... When I run the select query there are tens of thousands of records. ... And the Append Query: ... I can delete records in the table with no problems and I havent gotten any other warnings. ...
      (microsoft.public.access.queries)
    • RE: append queries
      ... query is only pulling records for the last 6 months). ... And the Append Query: ... and I havent gotten any other warnings. ... The database file is 1.01G. ...
      (microsoft.public.access.queries)

    Loading