Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement