If-Then problem

Gilrucht

Registered User.
Local time
Today, 09:44
Joined
Jun 5, 2005
Messages
132
I have a popup calendar that I created from the dbPopCalendar db here on this forum. It works perfectly. I created a tool tip telling users to click on the calendar icon to open the calendar. The tooltip visible property is set to no. I then created an If-Then statement on the mouse down event of the to to make the calendar visible. When that didn't work I tried the mouse move property property. What is confusing is that the code compiles but then when I go to my form I get a 438 runtime error telling me the object or method isn't supported. I get the same method whethr I use the mousedown or mousemove function. I have also tried both a label and a textbox. I have tried ! instead of the . The only difference was the ! wouldn't compile. Can anyone tell me whats wrong with my code? Here is thr code I tried for both events:

Private Sub cmdFrom_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Me!cmdFrom.GotFocus Then
Me!Label12.Visible = True
Else: Me.Label12.Visible = False
End If
End Sub



Private Sub cmdFrom_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Me.cmdFrom.GotFocus Then
Me!.Text13.Visible = True
Else: Me.Text13.Visible = False
End If
End Sub
 
If-Then

In the On Mouse Down property try something like this:

If Me.label12.Visible = True Then
Me.label12.Visible = False
Else
Me.label12.Visible = True
End If
 
Truck,
Thanks. The code worked but I had to run it off the mouse move event. When I used the mouse down property once the event fired the label stayed visible. One annoying problem I'm having is that when I move the move directly over the calendar control the label flickers visible and not visible very rapidly. It is only when I move the mouse slightly off the calendar that the label stays visible.
 
Flickering

Are you using Access 2003?
The flicker problem is a known issue, it happens with labels on the tab control.
You can work around it by changing it in a text box.
 
yes. I'm using Access 2003. Thanks for the info. I did not know that.
 
Truck, I switched the Label to the textbox. It didn't make a difference.
 

Users who are viewing this thread

Back
Top Bottom