I have subform datasheet that opens the Office File Picker Dialog when an empty field is clicked (user picks file, filename inserted into datasheet).
The problem is once the dialog is opened, it is positioned directly over several controls on the Parent form that have OnClick events.
When the user double clicks an item in the Office File Dialog, the control behind the Dialog (on the parent form) is getting a click event as the Dialog closes.
How do I prevent these rogue click events? Can I temporarily disable all click events on the main form while the file picker code is running?
I've used code to disable some commonly affected controls on the parent form while the Dialog is open, but the Dialog can be moved by the user. I would have to disable every control on the parent form for this to be effective.
In pseudo code, I'd like to do something like this:
Is there anyway to do something like this? Other suggestions?
Thanks in advance.
The problem is once the dialog is opened, it is positioned directly over several controls on the Parent form that have OnClick events.
When the user double clicks an item in the Office File Dialog, the control behind the Dialog (on the parent form) is getting a click event as the Dialog closes.
How do I prevent these rogue click events? Can I temporarily disable all click events on the main form while the file picker code is running?
I've used code to disable some commonly affected controls on the parent form while the Dialog is open, but the Dialog can be moved by the user. I would have to disable every control on the parent form for this to be effective.
In pseudo code, I'd like to do something like this:
Code:
set frm = Forms(Parent Form)
set dlg = Office File Dialog
frm.ClickEvents.Enabled = False
With dlg
Me!FileName = dlg.SelectedItems
End With
If dlg.Closed Then
frm.ClickEvents.Enabled = True
End If
Thanks in advance.