lable's or text box's text changing on Form

  • Thread starter Thread starter AlexD
  • Start date Start date
A

AlexD

I'm trying to change text (caption) of a lable or text box.
Initially
lblLable.Visible = False
lblLable.Visible = True

lblLable.Caption = "text1"

or

txtTextBox.Value = "text1"
even with adding
Me.Refresh

isn't working. It doesn't appear on a Form at all.
Only, when I'm doing it with a debug step by step it's
working.
Please, advise something.
 
AlexD said:
I'm trying to change text (caption) of a lable or text box.
Initially
lblLable.Visible = False
lblLable.Visible = True

lblLable.Caption = "text1"

or

txtTextBox.Value = "text1"
even with adding
Me.Refresh

isn't working. It doesn't appear on a Form at all.
Only, when I'm doing it with a debug step by step it's
working.
Please, advise something.

Are you entering into some code loop, so that Access doesn't have a
chance to repaint the window? You might try inserting

DoEvents

in your code, after making changes like this, if you want them to appear
before your code is done executing.
 
Thanks a lot. It's working now.
-----Original Message-----


Are you entering into some code loop, so that Access doesn't have a
chance to repaint the window? You might try inserting

DoEvents

in your code, after making changes like this, if you want them to appear
before your code is done executing.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


.
 
Back
Top