Create a Zoom Button (1 Viewer)

feinj

OracLegend
Local time
Today, 05:42
Joined
Oct 17, 2007
Messages
42
Is there any way to create a Zoom Button on a form that will open the Zoom form normally activated by the Ctrl-F2 command while in a text or memo field?
 

boblarson

Smeghead
Local time
Today, 05:42
Joined
Jan 12, 2001
Messages
32,059
Is there any way to create a Zoom Button on a form that will open the Zoom form normally activated by the Ctrl-F2 command while in a text or memo field?

Yep, the code is:

DoCmd.RunCommand acCmdZoomBox
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 05:42
Joined
Aug 30, 2003
Messages
36,140
I use this in the double click event of the textbox:

DoCmd.RunCommand acCmdZoomBox
 

boblarson

Smeghead
Local time
Today, 05:42
Joined
Jan 12, 2001
Messages
32,059
Oh, and you probably would need this in the button's click event:

Code:
Screen.PreviousControl.SetFocus
DoCmd.RunCommand acCmdZoomBox
 

feinj

OracLegend
Local time
Today, 05:42
Joined
Oct 17, 2007
Messages
42
Thanks again Bob. You are a life saver.
 

teiben

Registered User.
Local time
Today, 13:42
Joined
Jun 20, 2002
Messages
462
This doesn't work in 2010, I put this line on the got focus event, anyone know an alternative command?
 

missinglinq

AWF VIP
Local time
Today, 08:42
Joined
Jun 20, 2003
Messages
6,420
Does any VBA code run? Code does not run in 2007/2010 unless your database resides in a folder that has been declared a “trusted” location.

To trust your folder, click:
  1. Office Button (top left)
  2. Access Options (bottom of dialog)
  3. Trust Center (left)
  4. Trust Center Settings (button)
  5. Trusted Locations (left)
  6. Add new location (button)
Here's a visual for it, courtesy of BTAB Development:

http://www.btabdevelopment.com/ts/default.aspx?PageId=13

Linq ;0)>
 

Users who are viewing this thread

Top Bottom