barrytraver
Programmer
I'm using a MonthView control to let the user choose a date.
I put the MonthView control (plus a label and an OK command) button on a dialog box form which I call modally. The label simply says, "Choose a date and click on OK."
Here's the problem. For some reason (and I can't figure out why), it takes not one click but two to trigger the cmdOK_Click event!
Private Sub cmdOK_Click()
Debug.Print "The OK button was clicked."
frmChooseDateDialog.Hide
End Sub
Once that event is triggered, I can use the value in the calling form like this:
Date1 = frmChooseDateDialog.MonthView1.Value
The only problem, as I said, is that it takes two clicks (not one) to fire the cmdOK_Click event.
Does anyone have any idea what's going on (and, more important, how I can fix it so that a single click will trigger the cmdOK_Click event)?
Additional information: If the user clicks immediately on the OK button, a single click is sufficient to trigger the event (but that defeats the purpose, of course, which is to let the user select a date). Once the user clicks on the MonthVIew control, however, it takes a double click to trigger the cmdOK_Click event.
Thanks in advance for any assistance you might be able to provide.
I put the MonthView control (plus a label and an OK command) button on a dialog box form which I call modally. The label simply says, "Choose a date and click on OK."
Here's the problem. For some reason (and I can't figure out why), it takes not one click but two to trigger the cmdOK_Click event!
Private Sub cmdOK_Click()
Debug.Print "The OK button was clicked."
frmChooseDateDialog.Hide
End Sub
Once that event is triggered, I can use the value in the calling form like this:
Date1 = frmChooseDateDialog.MonthView1.Value
The only problem, as I said, is that it takes two clicks (not one) to fire the cmdOK_Click event.
Does anyone have any idea what's going on (and, more important, how I can fix it so that a single click will trigger the cmdOK_Click event)?
Additional information: If the user clicks immediately on the OK button, a single click is sufficient to trigger the event (but that defeats the purpose, of course, which is to let the user select a date). Once the user clicks on the MonthVIew control, however, it takes a double click to trigger the cmdOK_Click event.
Thanks in advance for any assistance you might be able to provide.