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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use Control Key To Open Different Report 1

Status
Not open for further replies.

LJtechnical

Technical User
Aug 7, 2002
90
0
0
GB
Hi,

I have a button which outputs a report to pdf, all works perfectly. Now I would like to enable the user to hold down the control key and click the same button to have the report out put to word.

I'm fine with the output to word bit, but not so sure how or where to code the control key bit. I guess i'll need to use the keydown event of the main form, but how to lnk this to click event of the button is troubling me.

Any suggestions?

Thanks
 
Here's an example

Code:
Private Sub cmdSave_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Shift = acCtrlMask Then
MsgBox "Control Key is Down"
End If
End Sub

HTH

John

Use what you have,
Learn what you can,
Create what you need.
 
Thanks for that. I was just using the wrong event it would seem.

Still worthy of a star though.
 
Thanks, LJ! Glad to help.

John

Use what you have,
Learn what you can,
Create what you need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top