A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Continous Form using Key down



 
 
Thread Tools Display Modes
  #1  
Old May 2nd, 2008, 06:34 PM posted to microsoft.public.access.forms
CD Tom
external usenet poster
 
Posts: 118
Default Continous Form using Key down

is there a way to us the key down event to move to next line on a continous
form. Right now I have four columns across the form, when the user presses
enter the cursor moves to the next column. That's fine except I would like
to be able to allow the user to press the down arrow and have the cursor move
down to the next record instead of across the row, is this possible? Thanks
for any help.
Tom
  #2  
Old May 3rd, 2008, 02:17 AM posted to microsoft.public.access.forms
Rob Parker
external usenet poster
 
Posts: 701
Default Continous Form using Key down

Hi Tom,

Place the following code into the KeyDown event of each of the textboxes in
your continuous form. It actually does a little more than you asked for -
down arrow moves to next record, up arrow moves to previous record, Home
moves to first record, End moves to Last record.

On Error Resume Next 'prevents error message if can't move to specified
record
Select Case KeyCode
Case 35 'End
DoCmd.GoToRecord , , acLast
Case 36 'Home
DoCmd.GoToRecord , , acFirst
Case 38 'Up arrow
DoCmd.GoToRecord , , acPrevious
Case 40 'Down arrow
DoCmd.GoToRecord , , acNext
Case Else
End Select

HTH,

Rob


"CD Tom" wrote in message
...
is there a way to us the key down event to move to next line on a
continous
form. Right now I have four columns across the form, when the user
presses
enter the cursor moves to the next column. That's fine except I would
like
to be able to allow the user to press the down arrow and have the cursor
move
down to the next record instead of across the row, is this possible?
Thanks
for any help.
Tom


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:20 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.