Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 10th, 2006, 12:55 AM
Registered User
 
Join Date: Jun 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default SendKeys

Hi everybody!

Basically, if I use:

Private Sub cmdButton_Click()
    MsgBox "Test"
    SendKeys "~"
End Sub

Why doesn't the system click Ok on the Message Box? Instead, it sends the enter key to the Command Button resulting in a loop!

Does anyone know how to set the active dialog to take the keys?

I am asking in the hope that I can apply the same thing to the RunReportAsPDF function that is floating around - I don't want my users to have to use the Save As Dialog that opens...

Thanks in advance,

Warren


 
Old July 16th, 2006, 02:55 AM
Friend of Wrox
 
Join Date: Jul 2005
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I would avoid using sendkeys. You are asking for issues.

There is another free solution that will do exactly what you want already. No Prompts! Check out:

http://www.lebans.com/reporttopdf.htm





Boyd
"Hi Tech Coach"
Access Based Accounting/Business Solutions developer.
http://www.officeprogramming.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendkeys Add-In Problem tiabooks Excel VBA 0 November 6th, 2006 01:31 PM
How to avoid printing "1" after Sendkeys font45 Excel VBA 2 August 18th, 2006 05:21 PM
Please Help! - SendKeys wassa Access VBA 1 June 9th, 2006 07:41 AM
Problem with SendKeys while downloading a file desperado1306 Excel VBA 0 May 25th, 2006 12:05 PM
SendKeys.Send LCTRL ? ItshiBan VS.NET 2002/2003 0 September 4th, 2003 04:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.