Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting first and last dates of prior month
Message
 
 
To
All
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Title:
Selecting first and last dates of prior month
Miscellaneous
Thread ID:
00628029
Message ID:
00628029
Views:
60
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
Map
View

Click here to load this message in the networking platform