Command Button to Perform Keyboard Key Task

M

MIL_Andy

Good Afternoon All,

First may i say thank you! I've been using these boards for a long time and
its a real help.
Unfortuantly i've come across a problem i just can not solve and hoping you
good people can help once again.

All i simply want to do is for a command button to perform a keyboard key
task.
I.e.

Button 1 -> On Click -> PageUp
Button 2 -> On Click -> PageDown

I know that the Keycode's for the above is vbKeyPageUp and vbKeyPageDown i'm
just lost as to making it function.

Thank you again in advance,

Andy
 
T

Tom van Stiphout

This might be a job for the SendKeys function. Look it up in the Help
file.

-Tom.
Microsoft Access MVP
 
M

Marshall Barton

Don't count on it. SendKeys is fraught with problems and
nearly impossible to use in A2007.

If you'll explain your form's design and what you are trying
to accomplish, there has to be something better than using
SendKeys.
 
M

MIL_Andy via AccessMonster.com

Hi Marshall,

On my forms I'm trying to replace using the vertical scroll bar with two
buttons.

I'm not too concerned as all I'm doing is creating a proto type system prior
to re building again using ASP .NET 2.0 and SQL server (May point out I'm not
doing that part).

Cheers,

Andy
 
M

Marshall Barton

If it's just a prototype, why not use the real scroll bars?

If you just want to navigate among records in a continuous
form, then you should be able to use the Move... methods on
the form's recordset.

For some more complex scenarios, maybe you can get useful
ideas from one of the example databases available at
http://www.lebans.com/setgetsb.htm
 

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