Creosote65
Technical User
Hi all,
I've added a popup calendar to an Access form, which is pretty straightforward. When I double-click a date, it will populate a field on my form and close the popup. I have been trying to play with the object properties to make it default to the current date, it doesn't seem to accept the "=now()" setting for the default value property.
Is there another approach that I might take, maybe by setting the current date through a variable?
Here is the underlying vba so far:
1 Private Sub actlCalendar_DblClick()
2 Dim dtmDate As Date
3 'To set the date control to date selected on the calendar
4 dtmDate = Me.ActiveControl.Value
5 DoCmd.Close acForm, Me.Name
6 Screen.ActiveControl.Value = dtmDate
7 End Sub
Thanks,
Pierre
I've added a popup calendar to an Access form, which is pretty straightforward. When I double-click a date, it will populate a field on my form and close the popup. I have been trying to play with the object properties to make it default to the current date, it doesn't seem to accept the "=now()" setting for the default value property.
Is there another approach that I might take, maybe by setting the current date through a variable?
Here is the underlying vba so far:
1 Private Sub actlCalendar_DblClick()
2 Dim dtmDate As Date
3 'To set the date control to date selected on the calendar
4 dtmDate = Me.ActiveControl.Value
5 DoCmd.Close acForm, Me.Name
6 Screen.ActiveControl.Value = dtmDate
7 End Sub
Thanks,
Pierre