Got/Lost Focus If/Then Statments

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Greetings...

Is it possible to utilize the If/Then statements with the Got/Lost Focus
commands?

Thanks,
Alfia
 
I have a calendar object on my form. Now the calendar always shows. I only
want the calendar to pop up if some selects that ubound object.
 
Try something like this in the bound control's Enter event:

Me.calendarcontrol.Visible = True

And in the other controls' Exit event:

Me.calendarcontrol.Visible = False
 
Greetings...

I get an error message that states an object with the focus cannot be
hidden. I tried it on the On Exit and On Lost Focus.

Marshall Barton said:
Try something like this in the bound control's Enter event:

Me.calendarcontrol.Visible = True

And in the other controls' Exit event:

Me.calendarcontrol.Visible = False
--
Marsh
MVP [MS Access]

I have a calendar object on my form. Now the calendar always shows. I only
want the calendar to pop up if some selects that ubound object.
 
Oops, hit the wrong key.

Right, the Focus must be set somewhere else before making it
invisible. Maybe this will do:

Me.someothercontrol.SetFocus
Me.calendarcontrol.Visible = False
 
Back
Top