Calendar Control

N

Nick

I am trying to use a calendar control pop-up to up-date a
bound textbox by double clicking on the textbox. This
works well while there is a value in the textbox. If you
want to change the date the pop-up opens at the same date
as in the textbox. However if the textbox has a null value
how can I set the control to default to Now().

Your help is appreciated
Nick
 
N

Nick

Thanks Allen,
This works really well.
I was wondering if it would be possible to also have this
modified so that when you are in a situation where you are
using From-To Dates, when you click either button that the
form opens so that you have two calendar forms in one?
This would enable you to up-date both from and to at one
time, reducing the amount of time.
Hope this make sense

Regards
Nick
 
A

Allen Browne

As designed, you need 2 command buttons - one for the From date, and the
other for the To date.

Perhaps you would like to recode it for your needs also? :)
 
G

Guest

you coud use this code in the click event of one button.
Private Sub cmdsetdates_Click()
On Error GoTo cmdSetDates_Error
If cmdsetdates.Caption = "Set Beginning Date" Then
BeginDate = CalPickAday.Value
cmdsetdates.Caption = "Set Ending Date"
Else
EndDate = CalPickAday.Value
cmdsetdates.Caption = "Set Beginnign Date"
End If
Exit Sub

cmdSetDates_Error:
MsgBox "Error # " & Err.Number & ": " & Err.Description
Exit Sub

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top