Hide field after leaving it

Mmattson

Registered User.
Local time
Today, 15:29
Joined
Oct 28, 2002
Messages
46
I tried to hide a text field after updating contents. I used the AfterUpdate with this code to get what I wanted...

Me.Q1TC.Visible = False

In the form the code ran and I got an...

"error 2165, can't hide a field that has the focus"

How do I hide this field? This is the same field that Elana helped me make visible yesterday.
 
try on exit instead
 
you could try this in the after update

Me.TheNextField.SetFocus
Me.Q1TC.Visible = False
 
It seems to be working the way I would like it too.

One final question on this topic...

I will have 10-15 duplicates for this routine. What is the easiest way to have this set of events occur for all? Duplicating this code for each field or is there a more efficient method.

Thanks for all the responses so far.
 

Users who are viewing this thread

Back
Top Bottom