G
Guest
I have a form that allows users to enter working days for a month in 12 text
boxes and I call a ValidateWorkingDays procedure in the BeforeUpdate event
for each monthly text box. If user needs to re-enter value I have this code
in my ValidateWorkingDays procedure:
With Me.Days
.SetFocus
.SelStart = 0
.SelLength = Len(Days)
End With
Days is a string in the ValidateWorkingDays procedure and I pass the
textbox control text to the procedure e.g. Call
ValidateWorkingDays(txtApril.Text, cancel = False)
I get invalid use of Me keyword in a runtime error.
I don't want to repeat code in each month. I'm new at this thanks for any
help.
Jake
boxes and I call a ValidateWorkingDays procedure in the BeforeUpdate event
for each monthly text box. If user needs to re-enter value I have this code
in my ValidateWorkingDays procedure:
With Me.Days
.SetFocus
.SelStart = 0
.SelLength = Len(Days)
End With
Days is a string in the ValidateWorkingDays procedure and I pass the
textbox control text to the procedure e.g. Call
ValidateWorkingDays(txtApril.Text, cancel = False)
I get invalid use of Me keyword in a runtime error.
I don't want to repeat code in each month. I'm new at this thanks for any
help.
Jake