Strange AppAcctivate behavior (1 Viewer)

Abby N

Registered User.
Local time
Today, 12:27
Joined
Aug 22, 2000
Messages
123
I have an old DOS based database that I’ve been manipulating with some Access scripts. Basically I take information from my Access DB and use sendkeys functions to copy the information into the old DB. (Not pretty, I know. But, the old DB only accepts keystroke input.) Everything worked fine until I introduced this function. It changes the keyboard map file to ensure that the sent keys are interpreted properly.

Function SetKeyboard ()
AppActivate "DOS DB"
SendKeys “%OK{Tab 3} j:\script\script.kmp{enter}", True
AppActivate "Access Scripts"
End Function

The function works fine. However, after using the function, AppActivate starts behaving strangely. Here is an excerpt from one of my scripts and the results it produces.

SetKeyboard ‘sets the keyboard

AppActivate "DOS DB" ‘DOS DB doesn’t activate
SendKeys "%=+{F10}", True ‘keystrokes sent to DOS DB
SendKeys "{DOWN 4}%{Right}", True ‘keystrokes sent to DOS DB
SendKeys "+{F10}+{Tab}" & strBranch, True ‘keystrokes sent to DOS DB
SendKeys "%e", True ‘keystrokes sent to Access
SendKeys "l", True ‘keystrokes sent to Access

Any keystrokes from this point on are sent to the DOS DB even though Access remains the active app the entire time. Can anyone explain what’s going on? Barring that, can anyone tell me another method activating the DOS DB? I thank you in advance for any ideas.

~Abby
 

Users who are viewing this thread

Top Bottom