There are several ways to do it both in Excel and Access. Don't know exactly what you are referring to but both have the DateSerial function which will give the date of the last of the month ..
I'm actually working in access and I have 12 textboxes with dates-and I want to check each box-that if the previous box was the last day of the month-then I should leave that box empty. so how would I go about doing that?
thank you
Assuming you know you have a valid date (or nothing) in textbox1 then in the beforeupdate event of textbox2 you could put something like ..
Code:
if Month(Nz(Textbox1)) = Month(Nz(Textbox1) + 1) Then
If Not IsNull(Textbox2) Then
Msgbox "Input not allowed, Textbox1 is End of Month"
Cancel = True
end if
End if
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.