Re: Hiding a text box on a form

  • Thread starter Thread starter John W. Vinson
  • Start date Start date
J

John W. Vinson

I have tried:
Me.Textname.Visible = False in the text box Lost Focus event, and also
on the Got Focus event, but it is still visible on the form.
Am I using the code in the wrong place for this?

Thanks

What exactly are you trying to accomplish? At what point should the box be
visible, and when not?

I'm pretty sure you cannot make it invisible while it has the focus, so in
addition to being a very odd event to choose (make it vanish when you click on
it!?) it probably won't work! If its visibility depends on its contents, then
the textbox's AfterUpdate event and the form's Current event would seem to be
more appropriate.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
What I am trying to achieve here is to hide the ToolID text box which I
placed on the form so that the audit trail function and events would run
without error as a previous post.

Just set the Visible property of the control to No in form design view. No
code whatsoever is needed.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
Back
Top