G
Guest
Hi,
Recently upgraded from access 2000 to 2003 and using XP pro.
Being lazy, I used various 1 line macros to perform sendkey action to
navigate through my forms and they worked fine in ac2000.
But when I start using ac2003 (without converting to 2003 format), things
start acting strange. Simple macros like sending the " enter " keystrokes
would not work 90% of the time.
After asking for help before, I was advised I should use VBA instead of
using macro to perform these steps. So I wrote a simple simple function to
perform 1 single action, i.e. to send the "enter" keystroke:
Function send_enter_key()
On Error GoTo ERR_SEND_ENTER_KEY
SendKeys "{ENTER}", False
Exit Function
EXIT_SEND_ENTER_KEY:
Exit Function
ERR_SEND_ENTER_KEY:
MsgBox Error$
Resume EXIT_SEND_ENTER_KEY
End Function
The first time I ran it, it perform as expected, but after a while, it stop
working, the cursor will stop at this field and instead of the enter
keystroke being sent, I have to type it myself. And then a few records later
it started working again!!
Have I done something wrong? I used this function in either on enter event
or on got focus event.
Everything else seems to be working ok, I just like to have this working to
achieve consistency in data entry and to save me quite a few keystrokes.
Thanks in advance.
Best regards
Downunderq
Recently upgraded from access 2000 to 2003 and using XP pro.
Being lazy, I used various 1 line macros to perform sendkey action to
navigate through my forms and they worked fine in ac2000.
But when I start using ac2003 (without converting to 2003 format), things
start acting strange. Simple macros like sending the " enter " keystrokes
would not work 90% of the time.
After asking for help before, I was advised I should use VBA instead of
using macro to perform these steps. So I wrote a simple simple function to
perform 1 single action, i.e. to send the "enter" keystroke:
Function send_enter_key()
On Error GoTo ERR_SEND_ENTER_KEY
SendKeys "{ENTER}", False
Exit Function
EXIT_SEND_ENTER_KEY:
Exit Function
ERR_SEND_ENTER_KEY:
MsgBox Error$
Resume EXIT_SEND_ENTER_KEY
End Function
The first time I ran it, it perform as expected, but after a while, it stop
working, the cursor will stop at this field and instead of the enter
keystroke being sent, I have to type it myself. And then a few records later
it started working again!!
Have I done something wrong? I used this function in either on enter event
or on got focus event.
Everything else seems to be working ok, I just like to have this working to
achieve consistency in data entry and to save me quite a few keystrokes.
Thanks in advance.
Best regards
Downunderq