Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Macros / November 2004

Tip: Looking for answers? Try searching our database.

ac2k macro not working properly in ac2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
downunderq - 26 Nov 2004 01:39 GMT
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.
Steve Schapel - 26 Nov 2004 07:38 GMT
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.

Signature

Steve Schapel, Microsoft Access MVP

> Hi
> Recently upgraded from access 2000 to 2003. I have a simple macro that issue
[quoted text clipped - 20 lines]
>
> Can anyone help? thanks in advance.
downunderq - 27 Nov 2004 11:11 GMT
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

> Downunderq,
>
[quoted text clipped - 29 lines]
> >
> > Can anyone help? thanks in advance.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.