Connecting Tech Pros Worldwide Forums | Help | Site Map

Run Update Query silently in background

ghadley_00@yahoo.com
Guest
 
Posts: n/a
#1: Dec 30 '05
I have a MS access 200 DB in which I have an update query which
repalces all the " " with ''" in a field. I would like the update query
to run in the background, and not ask the user for any perrmissions. I
was thinking to run the query as part of the autoexec macro.

can anyone recommend a way that I can have the update query run in the
background? I don't see an obvious way to set the SetWarnings command
for the query.

Any help would be greatly appreciated.

Best wishes,

George
ghadley_00@yahoo.com


Rick Brandt
Guest
 
Posts: n/a
#2: Dec 30 '05

re: Run Update Query silently in background


ghadley_00@yahoo.com wrote:[color=blue]
> I have a MS access 200 DB in which I have an update query which
> repalces all the " " with ''" in a field. I would like the update
> query to run in the background, and not ask the user for any
> perrmissions. I was thinking to run the query as part of the autoexec
> macro.
>
> can anyone recommend a way that I can have the update query run in the
> background? I don't see an obvious way to set the SetWarnings command
> for the query.
>
> Any help would be greatly appreciated.
>
> Best wishes,
>
> George
> ghadley_00@yahoo.com[/color]

CurrentDB.Execute "QueryName", dbFailOnError

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


Steve
Guest
 
Posts: n/a
#3: Dec 30 '05

re: Run Update Query silently in background


Another way to do it is to use (in VBA):
On Error Resume Next
DoCmd.OpenQuery "qryName"

Rick Brandt
Guest
 
Posts: n/a
#4: Dec 30 '05

re: Run Update Query silently in background


Steve wrote:[color=blue]
> Another way to do it is to use (in VBA):
> On Error Resume Next
> DoCmd.OpenQuery "qryName"[/color]

I don't believe that would eliminate warnings and confirmation prompts.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


Steve
Guest
 
Posts: n/a
#5: Dec 30 '05

re: Run Update Query silently in background


Sorry, I meant:
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryName"
DoCmd.SetWarnings True

Don't know what I was thinking when I wrote the On Error Resume Next
bit.

Closed Thread


Similar Microsoft Access / VBA bytes