General information
Category:
Coding, syntax & commands
Title:
Selecting first and last dates of prior month
Hello everyone!
I have a text date box that I would like automatically filled with the date of the first of last month and another box that should be filled with the date of the last date of last month. I've tried setting the value on the form load event to "Date - Day(Date)"
but I can't seem to get the correct code.
i.e.
Private Sub Form_Load()
tdbBegin.value = Date - Day(date -30)
tdbEnd.value = Date - Day(Date)
End Sub
Can anyone please help?
Thank you very much!
Max
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only