I have a frame that allows me to select either All merchants for a report, or the Top n Merchants. The two option buttons work fine.
I want to have the behavior be as follows:
If I type a value into the text box associated with Top N (ie I am implicitly selecting that option), then I want that option to be selected.
So, I put the following into the Exit event handler:
Private Sub rptTopNMerchantsValue_Exit(ByVal Cancel As MSForms.ReturnBoolean)
' If we have a valid value (numeric) then
' force the corresponding button to true
If Me.rptTopNMerchantsValue = "" Then ' Don't do anything if the field is empty
Else
Me.rptTopNMerchants = True ' Select the option button
End If
End Sub
It doesn't work!
When I simply tab out of the text field the event doesn't fire. If I tab back to the frame that contains the text box then it does fire (about 2 minutes and 20 tabs late!). Similarly, if I click on the field (after clicking elsewhere on the form), the event will fire. (This of course, is really an On Entry event!)
I'm stumped about why this should (mis-)behave in this manner.
Any ideas?
Tony
Bookmarks