Re: Quuestion about SendKeys

From: Matthew Mark <matthew.mark_at_edwards.af.mil>
Date: 11 Jul 2001 15:57:45 -0700
Message-ID: <69ef7ae8.0107111457.1665e100_at_posting.google.com>


rbrowniii_at_compuserve.com (Rick Brown) wrote in message news:<82227677.0107020821.7f9828a8_at_posting.google.com>...
> >
> > >I want to tackle this problem by using the sendkey command. <<
>
> Have you thought about using an AutoKeys macro to override pre-set keys?
>
> Rick

Assuming you correct your sql statements, you can run action queries:insert, update, delete by using: Docmd.runsql"sql statement goes here". When you do this, and link it to an event, any literals which would normally be in double quotes, must be in single quotes.

Also, you can shut off the access error messages before and after the statement with 'docmd.setwarnings false' then after finished turn on with 'docmd.setwarnings true'. Caution, if you ever turn off the warnings, make sure they are turned back on. Error trapping is the best bet. To learn error trapping, on a form, install a button using the wizard. Then open the code of the event procedure of the on_click event and memorize the syntax.

In short, you can use code, associated to an event, rather than using send keys. the only thing I use send keys for is to create hot keys to open forms or run code I to show or hide certain toolbars.

Feel free to ask for further explanation if this does not make sense. Received on Thu Jul 12 2001 - 00:57:45 CEST

Original text of this message