hi,
i am struggling with getting a if then statement to work correctly. I have a DB which is set up as a many to many as it releates to vehicle hire with a start_date and end_date. what i need the system to do is to
i currently have the code for the first bit but am struggling with the next bit any help appreciated.
i am struggling with getting a if then statement to work correctly. I have a DB which is set up as a many to many as it releates to vehicle hire with a start_date and end_date. what i need the system to do is to
- confirm hire end date is > hire start date
- hire start date for next customer of vehicle is > end date of previous customer
- end date must be populate before new start date can be entered
i currently have the code for the first bit but am struggling with the next bit any help appreciated.
Code:
Private Sub Date_Handed_Back_AfterUpdate()
If Me.Date_Handed_Back < Me.Start_Date Then
MsgBox "Please enter a date greater than or equal to Hire Start Date."
Me.Date_Handed_Back.SetFocus
End If