Using Form, Command Button, then Macro...

ktariske

Registered User.
Local time
Today, 02:26
Joined
Jun 12, 2002
Messages
31
I have a form that has command buttons that accomplish a variety of tasks, from creating a text output to updating a table from btch results, then clearing a temp table. Problem is, when the user hits the update batch/clear current batch button, it will prompt to over right old text file, and asks if he wants to delete the rows in the temp table. Is there anyway to bypass this so it's invisible to the user?

Thanks.

Kriss.
 
In your macro, first line, choose «Set Warning» and give «No» as parameter.
In your macro, last line, choose «Set Warning» and give «Yes» as parameter.
 
Is that in the coding someplace?

Real novice here, where can that be found??? In the code?
 
If you are working with VBA then it should read like this:
Code:
DoCmd.SetWarning False 'Doesn't show the warnings from now on
[...]
DoCmd.SetWarning True 'Shows the warnings from now on
You put the code that you already have between these two lines.
 
In the database window, select "Macros"
Under Macros, select the macro you want to edit and click on "Design"
Select the first line in the macro and click on "Insert" (at the top of the screen), then Rows
Under Action, select "SetWarnings"
In Action Arguments (at bottom of macro design screen), set Warnings On to "No"
Save the Macro and close
Done...
 
Thanks.

It still prompts me for the over-right file, but then I read the help, and that's the expected outcome,. I just thought I could avoid that with some VB code, but I guess that will just have to do.

Thanks for your help.
 
If you use .Execute instead of RunSql, you don't need the SetWarnings False etc
 

Users who are viewing this thread

Back
Top Bottom