I have two boxes, one contains an order date and one contains a required date. I have code that compares these so if the required date is earlier than the order date an error message shows. If this occurs then i want some code to clear the two boxes ready for new dates to be entered. Here is my attempt so far.
When i try the Me.DateRequired.Value.Refresh it comes up with the error 'object required'. Anyone know why this is happening ands how to acheive what i need?
Thanks in advance!
Code:
Private Sub Command43_Click()
If Me.DateRequired.Value < Me.OrderDate.Value Then
MsgBox "The date required is earlier than the date ordered" & vbCrLf & _
"Please select a date required later than the date ordered"
Me.DateRequired.Value.Refresh
Me.OrderDate.Value.Refresh
End If
End Sub
When i try the Me.DateRequired.Value.Refresh it comes up with the error 'object required'. Anyone know why this is happening ands how to acheive what i need?
Thanks in advance!