Suppress Warning Messages (1 Viewer)

anski

Registered User.
Local time
Today, 23:25
Joined
Sep 5, 2009
Messages
93
I have a form. I want to suppress this message: Do you want to suppress further error messages telling you why records cannot be pasted?

I made my own message box and the latter successfully appears but after I click on OK the above message still appears.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 08:25
Joined
Aug 30, 2003
Messages
36,125
See if SetWarnings works for you.
 

isladogs

MVP / VIP
Local time
Today, 16:25
Joined
Jan 14, 2017
Messages
18,216
You can also suppress the warning messages related to action queries by unticking the checkboxes in Access options.
However I would caution against suppressing the messages you quoted as, without them, you will not know whether or not an action has worked successfully. In what way is your message box better than the original?
 

isladogs

MVP / VIP
Local time
Today, 16:25
Joined
Jan 14, 2017
Messages
18,216
are you running an append query or a sql statement in code?
If so, try using
Code:
CurrentDB.execute "Your SQL statement here", dbFailOnError
 

anski

Registered User.
Local time
Today, 23:25
Joined
Sep 5, 2009
Messages
93
This is the form. The user can copy that transaction (in red) and paste that to the next new transaction. That is okay but I want him to write a description first (in blue) before they paste the transaction. I found a way to undo the paste function and show my own message. There is no append query or sql statement involved.
 

Attachments

  • form entry.JPG
    form entry.JPG
    22.4 KB · Views: 104

pbaldy

Wino Moderator
Staff member
Local time
Today, 08:25
Joined
Aug 30, 2003
Messages
36,125
So they just highlight all the records and copy/paste? I doubt many of us do that. I'd probably have a button that copied via SQL, after entering a description.
 

anski

Registered User.
Local time
Today, 23:25
Joined
Sep 5, 2009
Messages
93
I do that specially when the entries are repetitive and you just change the amounts. I will assume that others will do that. I just want to anticipate possible problems.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 08:25
Joined
Aug 30, 2003
Messages
36,125
I'm all for avoiding repetitive entry, I just don't think many developers use a method requiring the user to copy/paste like that. Maybe I'm wrong. I'm thinking more like:

 

Users who are viewing this thread

Top Bottom