trebor3900
Registered User.
- Local time
- Today, 05:57
- Joined
- Apr 26, 2005
- Messages
- 47
Can anyone tell me why having used the following code on all my forms in a database without any problems:
On one form in particular i suddenly get a runtime "13" - Type mismatch.
Code:
If DateDiff("d", Now, "01/04") <= 0 Then
Me.txtYear.SetFocus
Me.txtYear.Text = Year(Now) & "/" & (Year(Now) + 1) 'Date is past 1st April
Else
Me.txtYear.SetFocus
Me.txtYear.Text = (Year(Now) - 1) & "/" & Year(Now) 'Date is before 1st April
End If
On one form in particular i suddenly get a runtime "13" - Type mismatch.