Turn off default warning messages

R

Randy

I have a command button on my form that runs a macro. The macro opens an
update query, then a report. I know how to create my own messages. Such
as; "Please insert account number" but how do I turn off the default mess.
When I run the macro I get a message: "You are about to update 36 records"
"Are you sure" etc. I dont need this, plus this requires the user to click
on extra buttons. Thanks for the help. Randy
 
C

Cheryl Fischer

In your macro, make the first action a SetWarnings False. Most important,
make the last action in your macro a SetWarnings True
 
R

Randy

That was easy..Thank you
Cheryl Fischer said:
In your macro, make the first action a SetWarnings False. Most important,
make the last action in your macro a SetWarnings True
 
S

Steve Schapel

Cheryl said:
In your macro, make the first action a SetWarnings False. Agreed.

Most important,
make the last action in your macro a SetWarnings True
<pedantic>
Not actually necessary in a macro.
</pedantic>
 
H

Harmannus

Hallo,

Another suggestion ;-)

Turn the messages of on startup of your application. So put the code on e.g.
your switchboard. No need te set disable warnings at all...

Application.SetOption "Behavior Entering Field", 1
Application.SetOption "Confirm record changes", False
Application.SetOption "Confirm action queries", False

- The first one disables select alle text in a field. Can be handy as a user
entering through fields might type a letter that lets a whole field
disappear. This make entering a field go to the first position.
- Turn off warning messages for changes.
- Turn off warning messages for executing acion queries.

Regards,
Harmannus
 
C

Cheryl Fischer

I know. But then, there's that little voice that keeps saying, "G'wan, hit
that send key..." <BG>
 
D

Dirk Goldgar

Harmannus said:
Hallo,

Another suggestion ;-)

Turn the messages of on startup of your application. So put the code
on e.g. your switchboard. No need te set disable warnings at all...

Application.SetOption "Behavior Entering Field", 1
Application.SetOption "Confirm record changes", False
Application.SetOption "Confirm action queries", False

- The first one disables select alle text in a field. Can be handy as
a user entering through fields might type a letter that lets a whole
field disappear. This make entering a field go to the first position.
- Turn off warning messages for changes.
- Turn off warning messages for executing acion queries.

NO! Do *not* do this for any application to be used by anyone but
yourself! Those are Access-wide options, and so will affect all the
user's Access applications, not just your own. If this is only your own
personal application and you want all your Access apps to behave this
way, that's fine -- though you could just as easily set the options once
via the Tools->Options... dialog. But any other user has every reason
to expect his copy of Access to behave the way he set it up via the
Options dialog. The user may have come to depend on the safety net
provided by these confirmation dialogs. The application developer has
no right to yank this safety net out from under him.
 
H

Harmannus

Hallo,

I think this can be very practical. The mentioned options are in most cases
not realy efficient to maintain. If you want a confirmation e.g. for
deleting a record you build one yourself. Much more flexible. Besides going
through every workstation to set these options can be quit the job. On top
of that most access users wouldn't now where to find these options.
Furthermore you can get in to trouble if you have a sucure mdb that is not
accessable on table level. So how to bypass that without compremising your
sucurity level...

My humble opion ;-)

Regards,
Harmannus
 
D

Dirk Goldgar

Harmannus said:
Hallo,

I think this can be very practical. The mentioned options are in most
cases not realy efficient to maintain. If you want a confirmation
e.g. for deleting a record you build one yourself. Much more
flexible. Besides going through every workstation to set these
options can be quit the job. On top of that most access users
wouldn't now where to find these options. Furthermore you can get in
to trouble if you have a sucure mdb that is not accessable on table
level. So how to bypass that without compremising your sucurity
level...

My humble opion ;-)

Regards,
Harmannus

I'm afraid I don't follow you. You seem to be saying changing users'
application options in code is much easier than doing it manually, while
I'm saying you have no business changing users' application options at
all. Yes, if your code is going to delete a record, you should display
your own confirmation prompt if one is in order. But you should not
change the user's Access settings so that all other Access applications
on that user's workstation no longer behave the way the user expects
them to. That would be an outrageous imposition on the user.
 
H

Harmannus

Hallo,

Nice discussion ;-) I appreaciate the feedback!

I don't think you can generalies this a *outrageous imposition*. Most users
don't even know what normal *Access* behaviour is. E.g. executing a append
query and confirming every step is a way to programm things?!? If so i have
to do some redesigning ;-)

Regards,
Harmannus
 
D

Dirk Goldgar

Harmannus said:
Hallo,

Nice discussion ;-) I appreaciate the feedback!

I don't think you can generalies this a *outrageous imposition*. Most
users don't even know what normal *Access* behaviour is. E.g.
executing a append query and confirming every step is a way to
programm things?!? If so i have to do some redesigning ;-)

<lol> You may be right that most users don't actually know what to
expect from Access.

It may be that we're just not going to agree on this issue. I can only
say that I wouldn't tolerate any application on my PC that, without my
permission, changed how other applications behave.
 
H

Harmannus

Hallo,

Lets agree on not to agree ;-)
I can only say that I wouldn't tolerate any application on my PC that,
without my permission, changed how other applications behave.

How about Windows. Its based on doing things without permission ;-)

Regardds,

Harmannus
 
B

BlueFalcon

I have some buttons on a form that run a Make Table Query. How do
turn off the confirmations to delete the table
 
D

Dirk Goldgar

Harmannus said:
Hallo,

Lets agree on not to agree ;-)

Agreed. :)
without my permission, changed how other applications behave.

How about Windows. Its based on doing things without permission ;-)

Nah, I *gave* it permission.
 
H

Harmannus

Hallo,

The answer is in a message up the line ;-)

Application.SetOption "Confirm action queries", False

Set it in the on_open event of e.g. the switchboard.

But read Dirk Goldgar's comment. We do not agree on this isue :)

Regards,
Harmannus
 
S

Steve Schapel

Harmannus,

I followed your previous discussion with Dirk. I feel you should know
that Dirk is expressing a viewpoint that is shared by many, including
myself. I feel that the advice you have given to Blue Falcon is
irresponsible.
 

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