Remove Warning Messages

G

Guest

Hello,
I have added a command to a form to open and close a query-make table but
when I run it, warning messages pop up. How can I remove those messages.
Please help
 
J

Joan Wild

Look at the code behind that command button (design view; select the command
button, View...Properties, Event tab. Click the build button(...) beside
the property named On Click that currently has [Event Procedure] in it.

Change the code
....
DoCmd.SetWarnings = False
<whatever code there is to run the query>
DoCmd.SetWarnings = True
....

If that isn't clear enough, post the code that you currently have.
 
F

fredg

Hello,
I have added a command to a form to open and close a query-make table but
when I run it, warning messages pop up. How can I remove those messages.
Please help

DoCmd.SetWarnings False
DoCmd.OpenQuery "QueryName"
DoCmd.SetWarnings True
 
D

David W. Fenton

I have added a command to a form to open and close a query-make
table but when I run it, warning messages pop up. How can I
remove those messages.

Figure out what's causing the error and remove that condition.

It's never a good idea to just ignore errors by turning off the
warning messages.
 
G

Guest

There are no codes behing the command I am trying to run. The warning
messages pop up when opening a make-table query. I want to use the comand
Look at the code behind that command button (design view; select the command
button, View...Properties, Event tab. Click the build button(...) beside
the property named On Click that currently has [Event Procedure] in it.

Change the code
....
DoCmd.SetWarnings = False
<whatever code there is to run the query>
DoCmd.SetWarnings = True
....

If that isn't clear enough, post the code that you currently have.
--
Joan Wild
Microsoft Access MVP
Jay said:
Hello,
I have added a command to a form to open and close a query-make table but
when I run it, warning messages pop up. How can I remove those messages.
Please help
 
J

Joan Wild

You said 'I have added a command to a form to open and close a query-make
table'

How exactly are you running this query from the form?

--
Joan Wild
Microsoft Access MVP
Jay said:
There are no codes behing the command I am trying to run. The warning
messages pop up when opening a make-table query. I want to use the
comand
on the form to run the query behind scenes but I do not want the users to
see
the warning messages because I am using the upated table to run a new
query.

Joan Wild said:
Look at the code behind that command button (design view; select the
command
button, View...Properties, Event tab. Click the build button(...) beside
the property named On Click that currently has [Event Procedure] in it.

Change the code
....
DoCmd.SetWarnings = False
<whatever code there is to run the query>
DoCmd.SetWarnings = True
....

If that isn't clear enough, post the code that you currently have.
--
Joan Wild
Microsoft Access MVP
Jay said:
Hello,
I have added a command to a form to open and close a query-make table
but
when I run it, warning messages pop up. How can I remove those
messages.
Please help
 
G

Guest

I meant to say no visual basic code, I am running the query from the form
using a macro.

Joan Wild said:
You said 'I have added a command to a form to open and close a query-make
table'

How exactly are you running this query from the form?

--
Joan Wild
Microsoft Access MVP
Jay said:
There are no codes behing the command I am trying to run. The warning
messages pop up when opening a make-table query. I want to use the
comand
on the form to run the query behind scenes but I do not want the users to
see
the warning messages because I am using the upated table to run a new
query.

Joan Wild said:
Look at the code behind that command button (design view; select the
command
button, View...Properties, Event tab. Click the build button(...) beside
the property named On Click that currently has [Event Procedure] in it.

Change the code
....
DoCmd.SetWarnings = False
<whatever code there is to run the query>
DoCmd.SetWarnings = True
....

If that isn't clear enough, post the code that you currently have.
--
Joan Wild
Microsoft Access MVP
Hello,
I have added a command to a form to open and close a query-make table
but
when I run it, warning messages pop up. How can I remove those
messages.
Please help
 
J

Joan Wild

OK, then open your macro and use the SetWarnings Action (no), followed by
running the query, followed by SetWarnings Action (yes).



--
Joan Wild
Microsoft Access MVP
Jay said:
I meant to say no visual basic code, I am running the query from the form
using a macro.

Joan Wild said:
You said 'I have added a command to a form to open and close a query-make
table'

How exactly are you running this query from the form?

--
Joan Wild
Microsoft Access MVP
Jay said:
There are no codes behing the command I am trying to run. The warning
messages pop up when opening a make-table query. I want to use the
comand
on the form to run the query behind scenes but I do not want the users
to
see
the warning messages because I am using the upated table to run a new
query.

:

Look at the code behind that command button (design view; select the
command
button, View...Properties, Event tab. Click the build button(...)
beside
the property named On Click that currently has [Event Procedure] in
it.

Change the code
....
DoCmd.SetWarnings = False
<whatever code there is to run the query>
DoCmd.SetWarnings = True
....

If that isn't clear enough, post the code that you currently have.
--
Joan Wild
Microsoft Access MVP
Hello,
I have added a command to a form to open and close a query-make
table
but
when I run it, warning messages pop up. How can I remove those
messages.
Please help
 
G

Guest

Thank you!

Joan Wild said:
OK, then open your macro and use the SetWarnings Action (no), followed by
running the query, followed by SetWarnings Action (yes).



--
Joan Wild
Microsoft Access MVP
Jay said:
I meant to say no visual basic code, I am running the query from the form
using a macro.

Joan Wild said:
You said 'I have added a command to a form to open and close a query-make
table'

How exactly are you running this query from the form?

--
Joan Wild
Microsoft Access MVP
There are no codes behing the command I am trying to run. The warning
messages pop up when opening a make-table query. I want to use the
comand
on the form to run the query behind scenes but I do not want the users
to
see
the warning messages because I am using the upated table to run a new
query.

:

Look at the code behind that command button (design view; select the
command
button, View...Properties, Event tab. Click the build button(...)
beside
the property named On Click that currently has [Event Procedure] in
it.

Change the code
....
DoCmd.SetWarnings = False
<whatever code there is to run the query>
DoCmd.SetWarnings = True
....

If that isn't clear enough, post the code that you currently have.
--
Joan Wild
Microsoft Access MVP
Hello,
I have added a command to a form to open and close a query-make
table
but
when I run it, warning messages pop up. How can I remove those
messages.
Please help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top