Hello again,
I am getting a type mismatch error.
On my form,
a combo box
text box(enter new date)
text box(enter description)---this is where the type mismatch error is occuring.
here is the code.
Please help.
Anne
I am getting a type mismatch error.
On my form,
a combo box
text box(enter new date)
text box(enter description)---this is where the type mismatch error is occuring.
here is the code.
Code:
Private Sub Next_Week_Exit(Cancel As Integer)
If IsNull([Next_Week]) Then
Else
n = Len([Next_Week])
While n > 0
If Mid$([Next_Week], n, 1) > Chr$(48) And Mid$([Next_Week], n, 1) <= Chr$(57) Then
ans = 0
For x = 48 To 57
If Mid$([Next_Week], n - 1, 1) <> Chr$(x) And Mid$([Next_Week], n + 1, 1) <> Chr$(x) Then
Else
ans = ans + 1
End If
Next x
If ans = 0 Then
prev = Mid$([Next_Week], 1, n - 1)
aft = Mid$([Next_Week], n)
[Next_Week] = prev & "0" & aft
End If
End If
n = n - 1
Wend
End If
End Sub
Please help.
Anne