Requirements require me to display only month and day not month/day/year. Also wants default to be last month. Have that part fine in code but when I try to run form, I get an error occured in the call to windows date and time picker control. I used the following code in on form open
Dim LastMonth
'LastMonth = Now() - 30
LastMonth = Format(Now() - 30, "MM/DD")
Debug.Print LastMonth
DtDateFrom.value = last month
I also tried reformatting the date to make sure it passed as a string but received same error msg.
DtDateFrom.Value = Format(LastMonth, "mm dd")
Dim LastMonth
'LastMonth = Now() - 30
LastMonth = Format(Now() - 30, "MM/DD")
Debug.Print LastMonth
DtDateFrom.value = last month
I also tried reformatting the date to make sure it passed as a string but received same error msg.
DtDateFrom.Value = Format(LastMonth, "mm dd")