how to se sendkeys

S

seeker

1. How do I use sendkeys capslocks in on enter for a textbox. What is the
correct syntax

2. How do I use multiple key like if ctrl+enter is pressed data is saved to
a database table.
 
M

Mr. B

seeker,

The best idea is to never use "SendKeys" at all. There are multiple ways
to accomplish what you need without using this method which can fail you.

In the case of the text box. If you place a > in the "Format" property of
your text box, when the user exits the text box all charctes will
automatically be displayed as upper case.

You can also place the following line of VBA code in the "After Update"
event of your text box and when the user exits the text box, all characters
will be converted to upper case:

Me.Text2 = UCase(Me.Text2)
Replace the "Text2" with the actual name of your text box control.


-----
HTH
Mr. B
http://www.askdoctoraccess.com/
Doctor Access Downloads Page:
http://www.askdoctoraccess.com/DownloadPage.htm
 
S

seeker

thank you for these two excellant suggestions. Could you answer the second
question regarding multiple key press such as ctrl+enter to accomplish a
piece of code. Thank you.
 
T

Tony Toews [MVP]

seeker said:
2. How do I use multiple key like if ctrl+enter is pressed data is saved to
a database table.

What problem are you trying to solve here. Are you at the table
datasheet view, form view or what?

We should be able to give you alternative suggestions which don't
require SendKeys.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a free, convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/
 

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