Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keypress 1

Status
Not open for further replies.

Ouch

Programmer
Jul 17, 2001
159
GB
i want to have a button on my form that when presses does 'Shift F2'to open the zoom window for the associated control

i have looked up vbKeyShift vbKeyF2 but i dont know how to implement them.

can any help?
 
Try this:

Private Sub Command3_Click()
On Error Resume Next
me.controls("txtZoom").setfocus
'where txtzoom is the name of the textbox you want to zoom on
DoCmd.RunCommand acCmdZoomBox
End Sub


HTH

B ----------------------------------------
Ben O'Hara
Home: bpo@SickOfSpam.RobotParade.co.uk
Work: bo104@SickOfSpam.westyorkshire.pnn.police.uk
(in case you've not worked it out get rid of Sick Of Spam to mail me!)
Web: ----------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top