Link to home
Start Free TrialLog in
Avatar of Issa S.
Issa S.

asked on

Setwarnings =Yes not working in a Trusted DB !?

Hi all,,

I have recently made a successful split of my DB and it is working fine with _fe and _be as intended.

At the beginning of a loading macro (with punch of Queries inside it),  I set the 'setwarnings' to YES but no system message pops as if it set to No.
My DB is Trusted.  The Queries of the Macro are executing as required.

Any help please.
Avatar of PatHartman
PatHartman
Flag of United States of America image

Check the Access Options/Client Settings/Confirm settings.  I don't know if these override runtime actions.  All three options are checked in my apps:User generated image
Avatar of Issa S.
Issa S.

ASKER

Hi Pat,
Checked it and they are all Ticked.  No improvement  :(
I don't use macros in place of code so I don't know why this would not work.  Are you sure you have to set the warnings to yes?  They should NEVER, EVER be left set to No.  Leaving warnings set to No can cause you to loose changes to objects.  If you change something and forget to specifically save it and just close it instead, your changes will be silently discarded if warnings are off.  You only have to be burned once to etch this into your memory.  The one thing I do use macros for is to turn warnings off and on.  I do this because when I turn warnings Off, I always want to turn the hourglass on. This gives me a visual reminder so if I am stepping through code and happen to exit before the instruction to turn the warnings back on is executed I don't forget.  Then I can just double click on the setWarningsOn macro and that turns warnings on and the hourglass off.

Go through your code (not so easy when you are using macros - just one of the many reasons I don't use them) and make sure that every procedure that turned warnings off turns them back on before exiting.
"I set the 'setwarnings' to YES but no system message pops as if it set to No."
So ... you *want* the Warning messages to pop up for each action query you are executing in this startup Macro ?
(Usually it's the other way around)
Avatar of Issa S.

ASKER

Dear Joe, ,,
I want to set it while am developing. Sure I do set it back to "No" soon after I finish my debugging.
Thanks
You're going to need to post the macro you are using.  It is quite likely that further down in the code, the warnings are still being set off.
Avatar of Issa S.

ASKER

Dear Pat,,,

How about if it is set NO in some other Macros?  will it have any effect on subsequent run of other macros ?

Thanks
Since the property exists ONCE for the application, the setting is whatever it was last set to.  Seriously, this is not a property to mess around with.  It is extremely dangerous if you don't completely control its setting.  To be safe, ALWAYS set the hourglass on when warnings are off.  You only have to get burned once and loose hours of work in order to take my warning seriously.  From this question, it is clear that the on/off setting of the property is not being properly controlled.   You might want to fix up the macros to turn the warnings off and on again in only one place in each macro.  I also can't emphasize strongly enough that using the hourglass as a reminder that warnings are off will some day save your bacon.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.