Hello,
I have below codes on my form to restrict the user for data validation for entering the date.
question in this code i have given the criteria as greater than or equal to , while i am entering the equal to date also i am getting error message that i need to enter the later date. How i can mention that in this codes.
I have below codes on my form to restrict the user for data validation for entering the date.
Code:
Dim strSQL As String
strSQL = "SELECT Max([Requisition_table]![SAPRequisitionReleaseDate]) AS Max_Date"
strSQL = strSQL & " FROM Master_data INNER JOIN Requisition_table ON Master_data.Tender_Number = Requisition_table.Tender_NO"
strSQL = strSQL & " WHERE Tender_NO = """ & Me!Tender_Number & """"
With CurrentDb.OpenRecordset(strSQL)
If Not IsNull(!max_date) Then
If ((Me!Tender_Number_date) >= (!max_date)) Then
Cancel = True
MsgBox "Date must be Greater than: " & !max_date, vbExclamation
End If
End If
.Close ' close the recordset
End With
question in this code i have given the criteria as greater than or equal to , while i am entering the equal to date also i am getting error message that i need to enter the later date. How i can mention that in this codes.