473,657 Members | 2,401 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:\Progr am Files\MyApp\mya pp.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:\Progr am Files\MyApp\mya pp.exe", 1)
sSleep (100)
AppActivate strTest
SendKeys ("12345"), True
SendKeys ("{Tab}{Tab}{Ta b}{Tab}{Down}{T ab}{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 2099
On Sep 22, 3:27 pm, "SRT" <srthom...@gmai l.comwrote:
Any Ideas?
Pray!

Sep 22 '07 #2
On Sat, 22 Sep 2007 20:27:02 +0100, "SRT" <sr*******@gmai l.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:\Progr am Files\MyApp\mya pp.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:\Progr am Files\MyApp\mya pp.exe", 1)
sSleep (100)
AppActivate strTest
SendKeys ("12345"), True
SendKeys ("{Tab}{Tab}{Ta b}{Tab}{Down}{T ab}{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
2138
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=' in '*this = CTest::operator+(CTest&)((+t2))' test2.cpp:49: error: candidates are: CTest CTest::operator=(CTest&) make: *** Error 1
0
2152
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 Node:000 PID:1788(db2syscs.exe) TID:980 Appid:none DRDA Application Server sqljsCleanup Probe:60 DIA0001E An internal error occurred. Report the following error code : "ZRC=0xFFFFFBF6".
3
6307
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 v8.1.1.56", "s040616", "U497635", and FixPak "6". Product is installed at "/usr/opt/db2_08_01".
6
391
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 hides all of them including hiding the database window, disabling menu changes. What I am after is the same effect as disabling all the check boxes in startup which still leaves 'File', 'Edit', 'Insert','Records','Window' &'Help'. I want to do this...
7
3301
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 buffer into the character pointer. The code looks like the following: #include <stdio.h> #include <stdlib.h> #include "stdafx.h" BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call,
0
1891
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 emit to dynamically generate classes & method depends on the meta table in the database,here is my situation 1) In One method I generated the code Dynamic IL Code (Depends on the data pass to it), The generated code works for one dataset but does...
1
1805
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 Edition, that teorically does not make dll, but pratically does. I search vbc.exe and copy it to a new folder, in which i have the
12
3562
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 doesn't seem to work. Somebody please help!
12
2451
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 send contact info to email or data base when the "send" button is pressed. I've watched the tutorials over & over again. I just can't get it. Link: http://www.syfloristonline.zipa.com/contact_us.aspx. Need help
2
10023
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 is used to access and read the value stored in it C.A variable is allocated or deallocated in memory during runtime D.A variable can be initialized at the time of its creation or later 2. The.……types feature facilitates the definition of classes...
0
8402
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8315
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8829
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8734
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8508
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8608
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7341
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4323
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2733
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.