Ugly form. Ugly data. Loving DoCmd.Run Command acCmdZoomBox. Is there a way I can set the default for the double click event for every field on a form to be this? Instead of assigning them one by one?
Kay
from Toronto
Ugly form. Ugly data. Loving DoCmd.Run Command acCmdZoomBox. Is there a way I can set the default for the double click event for every field on a form to be this? Instead of assigning them one by one?
Kay
from Toronto
no. You cant.
Thinking aloud...
What about an On Open event for the form that has a command that sets any double-click to mean open the field in focus in a zoombox? I'm trying things using .OnDblClick. Does that trigger any ideas?
You can create a Function to do the zooming, select the Controls to be included, then assign the Function to the DoubleClick event of all of the Controls:
In a Standard Module:
Code:Public Function fExpand(ctl As Control) As Byte ctl.SetFocus DoCmd.RunCommand acCmdZoomBox End Function
When asked to Save the Module, name it anything except fExpand; having the Function and the Module sharing the same name confuses the Access Gnomes no end!
Then in Form Design View:
- Hold down the <Shift> Key and select (Left Click) each Control to be included
- Go to Properties - Events
- In the appropriate property (OnDblClick, in this case) enter =fExpand([Screen].[ActiveControl])
This will place the Function call in the OnDblClick event for all of the selected Controls, in one fell swoop!
Linq ;0)>