SendKeys Syntax Trouble

NJudson

Who farted?
Local time
Today, 13:50
Joined
Feb 14, 2002
Messages
297
I'm using Win98SE and Access 2k. I am trying to open a telnet session through Access but I'm having trouble inputing the IP address correctly via Sendkeys command. This is what I'm doing:

Call Shell("telnet", 1)
SendKeys """%CR""", True
SendKeys "xxx.xxx.xxx.xxx {enter}", True
...etc

It sends the IP address to the telnet but it sends
"xxx.xxx.xxx.xxx and fails the connection because of the open quotation mark at the beginning. Is something wrong with my syntax or is it just a problem with the sendkeys function? Thanks for any help.
 
is there another command you need to include to put focus in the textbox(?) to enter the IP address?

Would splitting the sendkeys into two commands solve it?
SendKeys "xxx.xxx.xxx.xxx", True
SendKeys "{enter}", True
 
It turns out that the line:
SendKeys """%CR""", True is not correct for sending input to textbox (or so it seems)!
I found that this line works ok:
SendKeys "%CR", True

Not sure what the differences are but it appears to work ok now. The sample code that I based my work on used triple quotes so that's what I thought I needed to use, but I guess things aren't always as they seem. Thank you for the time you spent looking at this problem.
 

Users who are viewing this thread

Back
Top Bottom