Problem with SetWarnings

Z

Zubalea

Anyone have any idea why the Me.LabelOnForm does not because visible
on my form when the 'DoCmd.SetWarnings False' is used.

Me.LabelOnForm.Visible = True
DoCmd.SetWarnings False
DoCmd.RunMacro ("MyMacro")
DoCmd.SetWarnings True
Me.LabelOnForm.Visible = False

I tried putting the Setwarnings in the macro. Same problem.
I tried putting a pause before the DoCmd.SetWarnings False command.
Same problem

Searched the web and found nothing on the matter.

Zubalea
 
T

tina

if you comment out the last four lines of code and run the procedure, does
the label become visible on the form? if so, you might try repainting the
form after the setting the Visible value, as

Me.LabelOnForm.Visible = True
Me.Repaint
DoCmd.SetWarnings False
DoCmd.RunMacro ("MyMacro")
DoCmd.SetWarnings True
Me.LabelOnForm.Visible = False

hth
 

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