Hi Guys,
I have this code below that restricts back date entries when the current date reaches 15th in April, July and October. Works perfectly on my computer but when i upload it onto SharePoint it no longer takes into consideration that current date must be equal and above 15th first for code to be triggered. It triggers straight away even thou today is only the 13th and stops entries.
Any idea why once on sharepoint it can no longer understand Date must be higher or equal to 15 first for code to trigger?
Here is my code. Any help appreciated.
' This will run in day #15 in Months 1, 4, 7, and 10 only
CurrDayMonth = Month(Date)
If Day((Date) >= 7) And (CurrDayMonth = 1 Or CurrDayMonth = 4 Or CurrDayMonth = 7 Or CurrDayMonth = 10) Then
If (DATE_IN >= DateSerial(Year(Date), Month(Date), 1)) Then Exit Sub
MsgBox "Invalid Date .... Date should be Greater than or Equal to " & DateSerial(Year(Date), Month(Date), 1)
DATE_IN = ""
DoCmd.GoToControl ("DATE_IN")