I currently have this code that fills a text box with available days of leave depending on how many years an employee has worked for a company:
Private Sub Form_Current()
'Set the cursor to the first name field
'If Full Time check box is checked, this determines _
'the number of days available to an employee depending on _
'length of service.
Me.FirstName.SetFocus
If (FullTime) Then
If [Years_of_Service] >= 7 Then
Me.DaysAval = 30
Else
If [Years_of_Service] >= 5 Then
Me.DaysAval = 25
Else
Me.DaysAval = 20
End If
End If
End If
End Sub
I would like to be able to fill the text box, if an employee is not full time, with any number manually. I currently cannot. Would I add code asking if the employee is not full time?
[This message has been edited by robert693 (edited 07-18-2001).]
Private Sub Form_Current()
'Set the cursor to the first name field
'If Full Time check box is checked, this determines _
'the number of days available to an employee depending on _
'length of service.
Me.FirstName.SetFocus
If (FullTime) Then
If [Years_of_Service] >= 7 Then
Me.DaysAval = 30
Else
If [Years_of_Service] >= 5 Then
Me.DaysAval = 25
Else
Me.DaysAval = 20
End If
End If
End If
End Sub
I would like to be able to fill the text box, if an employee is not full time, with any number manually. I currently cannot. Would I add code asking if the employee is not full time?
[This message has been edited by robert693 (edited 07-18-2001).]