Textbox and contents will not display

DOC666

New member
Local time
Today, 12:55
Joined
Apr 27, 2014
Messages
5
Can anyone help please

Me.TxtNotAllowed.Visible = True
dtTimer1 = Now
dtTimer2 = Now + TimeValue("00:00:10")
Me.TxtNotAllowed.Value = "You do not have permission to use this database !"
Do Until dtTimer1 >= dtTimer2
dtTimer1 = Now()
Loop
Me.TxtNotAllowed.Value = ""
DoCmd.Quit

The above code will run definetely for the 10 seconds however the textbox and contents do not display HOWEVER if stepped through with breakpoints line by line and the form checked each time the textbox DOES display and its contents.
:banghead:
 
Try adding

DoEvents

right before the loop.
 
Thanks Paul

Worked a treat

:)
 
Happy to help and welcome to the site by the way!
 

Users who are viewing this thread

Back
Top Bottom