Hey,
I was wondering if it would be possible to disable a Label from a form.
I have a form that has a few label that act like command buttons, I had to make them as label because of the appearance that I wanted. Therefore this is what I had coded for my labels.
Private Sub Form_Open(Cancel As Integer)
'Procedure that gives the command button special effect
'Set all the special effect for our buttons
Me.Btn_SupSec.SpecialEffect = 1
End Sub
Private Sub Btn_SupSec_Click()
' Time that agent advised the Supervisor
Me.HrsSupSecAvise = Time()
End Sub
Private Sub Btn_SupSec_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
' Give the effect of a command button
Me.Btn_SupSec.SpecialEffect = 2
End Sub
Private Sub Btn_SupSec_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
' Give the effect of a command button
Me.Btn_SupSec.SpecialEffect = 1
End Sub
This code works fine, but what I need to do is that when my textbox "HrsSupSecAvise " has a time in it I want to disable the button Btn_SupSec but I don't know how since it's really a lable...
This is what I had coded...
If Not IsNull(HrsSupSecAvise) Then
Me![HrsSupSecAvise].Enabled = True
Me.Btn_SupSec_Click = False
Else
'Nothing
End If
I was wondering if it would be possible to disable a Label from a form.
I have a form that has a few label that act like command buttons, I had to make them as label because of the appearance that I wanted. Therefore this is what I had coded for my labels.
Private Sub Form_Open(Cancel As Integer)
'Procedure that gives the command button special effect
'Set all the special effect for our buttons
Me.Btn_SupSec.SpecialEffect = 1
End Sub
Private Sub Btn_SupSec_Click()
' Time that agent advised the Supervisor
Me.HrsSupSecAvise = Time()
End Sub
Private Sub Btn_SupSec_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
' Give the effect of a command button
Me.Btn_SupSec.SpecialEffect = 2
End Sub
Private Sub Btn_SupSec_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
' Give the effect of a command button
Me.Btn_SupSec.SpecialEffect = 1
End Sub
This code works fine, but what I need to do is that when my textbox "HrsSupSecAvise " has a time in it I want to disable the button Btn_SupSec but I don't know how since it's really a lable...
This is what I had coded...
If Not IsNull(HrsSupSecAvise) Then
Me![HrsSupSecAvise].Enabled = True
Me.Btn_SupSec_Click = False
Else
'Nothing
End If