473,378 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Help with the following Code.

SRT
Hi,

I have the following code below, which works if I do the following

Call No1
'Call No2
Exit Sub

For whatever reason it fails at Me![Passwords2].SetFocus at the end of Sub
No2 with

Run-time Error '2110' - Unable to goto control

Any Ideas?

CODE:

Call No1
Call No2
Exit Sub

Sub No1()
strTest = Shell("C:\Program Files\MyApp\myapp.exe", 1)
sSleep (100)
AppActivate strTest
SendKeys ("12345"), True
SendKeys ("{Tab}{Enter}{Tab}"), True
For intA = 1 To 20
SendKeys ("+{Down}"), True
Next intA
SendKeys ("^(c)"), True
SendKeys "(%{F4})", True
AppActivate "Microsoft Access"
Me![Password1].SetFocus
SendKeys ("^(v)"), True
SendKeys ("{Tab}")

End Sub
Sub No2()
strTest = Shell("C:\Program Files\MyApp\myapp.exe", 1)
sSleep (100)
AppActivate strTest
SendKeys ("12345"), True
SendKeys ("{Tab}{Tab}{Tab}{Tab}{Down}{Tab}{Tab}{Enter}{Tab} "), True
For intA = 1 To 20
SendKeys ("+{Down}"), True
Next intA
SendKeys ("^(c)"), True
SendKeys "(%{F4})", True
AppActivate "Microsoft Access"
Me![Passwords].SetFocus
SendKeys ("^(v)"), True
SendKeys ("{Tab}")

End Sub
Sep 22 '07 #1
2 2087
On Sep 22, 3:27 pm, "SRT" <srthom...@gmail.comwrote:
Any Ideas?
Pray!

Sep 22 '07 #2
On Sat, 22 Sep 2007 20:27:02 +0100, "SRT" <sr*******@gmail.comwrote:

In addition to what lyle said:
Try Me.Pass <and intellisense will help complete>
! is for the fields in the underlying recordset.

-Tom.

>Hi,

I have the following code below, which works if I do the following

Call No1
'Call No2
Exit Sub

For whatever reason it fails at Me![Passwords2].SetFocus at the end of Sub
No2 with

Run-time Error '2110' - Unable to goto control

Any Ideas?

CODE:

Call No1
Call No2
Exit Sub

Sub No1()
strTest = Shell("C:\Program Files\MyApp\myapp.exe", 1)
sSleep (100)
AppActivate strTest
SendKeys ("12345"), True
SendKeys ("{Tab}{Enter}{Tab}"), True
For intA = 1 To 20
SendKeys ("+{Down}"), True
Next intA
SendKeys ("^(c)"), True
SendKeys "(%{F4})", True
AppActivate "Microsoft Access"
Me![Password1].SetFocus
SendKeys ("^(v)"), True
SendKeys ("{Tab}")

End Sub
Sub No2()
strTest = Shell("C:\Program Files\MyApp\myapp.exe", 1)
sSleep (100)
AppActivate strTest
SendKeys ("12345"), True
SendKeys ("{Tab}{Tab}{Tab}{Tab}{Down}{Tab}{Tab}{Enter}{Tab} "), True
For intA = 1 To 20
SendKeys ("+{Down}"), True
Next intA
SendKeys ("^(c)"), True
SendKeys "(%{F4})", True
AppActivate "Microsoft Access"
Me![Passwords].SetFocus
SendKeys ("^(v)"), True
SendKeys ("{Tab}")

End Sub
Sep 22 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: xuatla | last post by:
Hi, I encountered the following compile error of c++ and hope to get your help. test2.cpp: In member function `CTest CTest::operator+=(CTest&)': test2.cpp:79: error: no match for 'operator='...
0
by: xixi | last post by:
we are using db2 udb v8.1 on win 64 bit with fp3 with type 4 db2jcc.jar driver. such error generated , please help me understand this , thanks 2004-01-12-14.09.02.400000 Instance:DB2 ...
3
by: ChrisWinterscheid | last post by:
We are running DB2 8.1 on AIX 5.2. DB2level shows: DB21085I Instance "db2inst1" uses "32" bits and DB2 code release "SQL08016" with level identifier "02070106". Informational tokens are "DB2...
6
by: Mark Reed | last post by:
Hi all, I am trying to learn a little about programming (I know next to nothing so far) and have found some code which hides the toolbars. However, this bit of code is a little too effective and...
7
by: Timothy Shih | last post by:
Hi, I am trying to figure out how to use unmanaged code using P/Invoke. I wrote a simple function which takes in 2 buffers (one a byte buffer, one a char buffer) and copies the contents of the byte...
0
by: john | last post by:
Hi,All MS Tech Gurus: I need your help!!! It is the second time I post this message, I need get some feedback ASAP, Please Help!! Thanks a lot in advance. John I have a csharp method, using...
1
by: Robert | last post by:
Vb.Net Make dll that contain one function. Help Please. I would like to call a function from different applications. I think i have to make a dll. I have Visual Basic.net 2003 Standard...
12
by: What the Hell? | last post by:
I have a question for people out there, I need the Combobox to change a label caption when the user picks a certain thing from the list. How do I code this. I've tried an If Then statement, but it...
12
by: =?Utf-8?B?ZGdvdw==?= | last post by:
I designed a "contact_us" page in visual web developer 2005 express along with EW2 after viewing tutorials on asp.net's help page. Features work like they should, but I cannot figure out how to...
2
by: hcaptech | last post by:
This is my Test.can you help me ? 1.Which of the following statement about C# varialble is incorrect ? A.A variable is a computer memory location identified by a unique name B.A variable's name...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.