ac2k macro not working properly in ac2003

D

downunderq

Hi
Recently upgraded from access 2000 to 2003. I have a simple macro that issue
2 sendkeys command ({down}) that direct the cursor to go to the subform after
entering the mainform. It works fine in ac 2000, but when used in ac
2003,after entering the main form (consisting of 2 textbox and the subform,
hence the 2 sendkeys command), the cursor will travel to the 2nd text box and
goes no further until I hit the enter key to send the cursor into the subform
(wait has been set to no in the macro).

another simple macro not working also contain 1 sendkeys command ({enter})
for the last textbox in a form. Information in this text box is calculated as
information for the user only, therefore, by the time the user get to this
text, the work performed on the current record is all done and the system
would simply to to the next record.

once again, the cursor will (sometimes) just sits in this last textbox and I
need to physically hit enter to send it into the next record.

I have tried setting the security in ac2003 to hi, med, and lo but the
symptoms remain.

I also tried convert the macro to vba but the symptoms remain!

Can anyone help? thanks in advance.
 
S

Steve Schapel

Downunderq,

The use of SendKeys through all versions of Access has been problematic,
and many developers simply avoid its use at all costs. It is almost
always possible to do the same thing in a more reliable way, either with
macros or VBA procedures. For example, without knowing the details, I
imagine in your case the GoToControl macro action would achieve the same
purpose.
 
D

downunderq

Hi Steve,

Thanks for your input, the reason I used sendkeys is because I have quite a
few main form/subforms with the same structure, but the first control that i
want to go to in these subforms all have different names, by using sendkeys I
can use the macro on all of these forms, sort of like a template.

To use gotocontrol, as you realise, I would have to write a new macro for
each of these main form/subform structures because of the different control
names, possible but not very efficient and I am a lazy kind of a person :)

While waiting for a reply in this forum, I uninstalled ac2003 and installed
as2k on the same machine (a new dell insprion 8600 laptop), and of course
everything works as before.

If you can suggest any other ways, I would appreciate it, if not, my thanks
anyway, cheers.

Oh, one more thing, since I also tried converting the offending macro into
vba (in ac2003), the same symptoms still remains, any thoughts on this? thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top