How do I get rid of MSAccess in Warning boxes

D

Derek Brown

Hi All

How do I get rid of MSAccess Title in Warning boxes. When a form fails to
open (No Data for example) How do I stop the MsgBox Identifying the
Application as ACCESS by showing a MsgBox "Open Form was Cancelled" that has
ACCESS as it's Title.
 
T

tina

AFAIK, you can't change automatic warning messages' titles or content. all
you can do is to trap error codes and supply your own message boxes, using
the MsgBox() function's "Title" argument to show any title you choose.

hth
 
A

Arvin Meyer [MVP]

Some errors need to be handled by the operating system. That one can be
easily handled by adding error handling.

Right after the the name of the sub, add the line:

On Error Resume Next

If the form can't open, nothing will happen. If you want to give the user a
message, try this:

Sub Whatever()
On Error GoTo Error_Handler

DoCmd.OpenForm "frmWhatever"

Exit_Here:
Exit Sub

Error_Handler:
MsgBox "There's no data!", vbOKOnly, "YourTitleHere"
Resume Exit_Here

End Sub
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
D

david epsom dot com dot au

Set the Application Title in the Start Up properties
of the database.

This will be used instead "Access" in all of the
"Access" messages.

You will still get "Access" in VBA message boxes,
but if you don't know what I mean by that, it probably
is not going to affect you.

(david)
 
D

Derek Brown

Thats very comprehensive Thanks to you all!!
david epsom dot com dot au said:
Set the Application Title in the Start Up properties
of the database.

This will be used instead "Access" in all of the
"Access" messages.

You will still get "Access" in VBA message boxes,
but if you don't know what I mean by that, it probably
is not going to affect you.

(david)
 

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