Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Arrow down records on subform 2

Status
Not open for further replies.

Eprice

Technical User
May 6, 2003
209
US
Hi,
I can't seem to figure this one out. I have a form with a subform. After the user selects a 'user id' on the main form the subform shows all records for that user and the first field in the first record is selected. If I want to change the fifth record they have to tab or enter through every field to get where they want to be or use the mouse. My down arrow key will not work. Isn't there a way they can just go down in one field instead of tabbing through every field. If there is a way I can have the first record selector box 'selected' then the arrow keys will work but I don't know how. Any suggestions??
Thanks
Lisa
 
Lisa
Take a look at Tools>Options>Keyboard and make sure the Arrow keys are set to go to the next record.

Tom
 
I don't have that option. Only next field and next character for my arrow keys. This is Access XP if that helps.
Lisa
 
Lisa
Well, in fairness, I am using Office 2000. So maybe there's a difference.

In my Tools>Options>Keyboard, there's also 3 selections for "Move after enter". They are Don't Move, Next Field, Next Record.

I'm assuming there's some setting in Office XP that controls how the arrow keys function.

Tom
 
Set the forms KeyPreview property to yes, then in the on KeyDown event of the form something like the following:

[tt]if keycode = vbkeydown then
if me.currentrecord<me.recordsetclone.recordcount then
docmd.gotorecord,,acnext
end if
end if
if keycode = vbkeyup then
if me.currentrecord>1 then
docmd.gotorecord,,acprevious
end if
end if[/tt]

Note - air code, not tested...

Roy-Vidar
 
I suppose I could do that. If I make the 'Move After Enter' set to next record it changes my enter key to move down instead of across but the arrow still still doesn't work.
Lisa
 
Thanks Roy-Vider using the keycode events worked perfectly.
Lisa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top