SendKeys to open a form

G

Guest

I have read things about them being unreliable and trouble but i dont mind. OK

I want to be able to open a form by hitting a combination of keys. This can
be done using send keys, yes? how do I do this? I have done the "Sendkey"
thing in a macro and then "OpenForm" with the form selected but this doesnt
seem to work.

Any help is very much appreciated.

Any help on how to get rid of the minimise/maximise button (using VBA) on a
form would be excellent.

Thankyou, Ricky
 
S

Steve Schapel

Ricky,

I think you are getting muddled up between SendKeys and AutoKeys.

To "get rid of the minimise/maximise button", you can set the Min Max
Buttons property of the form to None. You can just do this in the
design view of the form. Or you could use a SetValue action in a macro.
Or you could use a VBA procedure like this...
Me.MinMaxButtons = "None"
 
G

Guest

Ok then could anyone explain the difference, but more importantly how to open
a form just by using key combination. thankyou very much

On the subject of getting rid of the MinMax buttons i have already done what
you have said but when the form is maximised (which it does automatically
when the form is opened) the 'restore' button can still be used (im talking
about the one jus to the left of where the 'X' button should be.

when the form is not maximised u can not use any of those buttons - the "X"
button can not be used and the MinMax buttons are not visible. But i want the
form maximised because if it is not it just defeats the purpose of not
allowing the MinMax and close button because i dont want the user to be able
to just access forms which they can if it is not maximised.

i hope i have explained well enough. can anyone please write back on my
problem!! anyhelp is very much appreciated. thankyou

ricky
 
S

Steve Schapel

Ricky,

Make a macro, and name it AutoKeys. In the Macro Name column of the
macro design, put the key combination you want to use. For example, if
you want to use Ctrl+f you would put this in the Macro Name:
^f
Then, enter the OpenForm action in the action column, and nominate the
name of the form you want to open using the Ctrl+f keystroke.

I don't know how to solve the other problem with the Restore button. I
have never used a maximised form in any of my databases. Maybe you
could try asking in the forms newsgroup instead. However, if you mean
you want to do this in order to deny the user access to the Database
Window, you can go to the Tools|Startup menu and set the database window
to be hidden.
 
G

Guest

Steve my friend, you are a legend.

Thanks very much for that help on the AutoKeys it works great! I dont know
how can explain something that simple and make it so complecated, so thankyou
for that simple help!

I shall post in the Form section to see what people say about my other
problem. Its not so much accessing the DB but accessing anything at all.
Anyway thanks for the help again!!
 

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

Similar Threads


Top