Scroll up a form

jgnasser

Registered User.
Local time
Today, 16:15
Joined
Aug 25, 2003
Messages
54
I have this quite long form that I have made for data entry. Its spans line 1.5 screens so the user has to scroll down. Wonder is that's a good design but anyway, my user is complaining that after entering data to the bottom and saves and creates a new record, she has to manually scroll up and has asked if there is a way to make the form scroll to the to every time she pushes the 'Add record' button. Is this possible?
 
Possibly make the tab order the first field on your form.
so that when a new record is created, the focus is on that field. that should put it up the top everytime.

although i havent tested this, its the first thing that came to mind.
 
jg,

I think you can add this to the Add button's code:

DoCmd.RunCommand (acCmdRefreshPage)

Wayne
 
ok testing that it doesnt seem to work.... so umm... sorry...
 
jg,

That didn't work?

What did it do (or not do)?

Can you post a sample db?

Wayne
 
Wayne, when I click the Add Record button, nothing happens appart from creating a new record. I have thought of another way, not sure if its the way to go. I have added this code to the button

Me!Age.setfocus
Sendkeys "{TAB}"

so that when the addrecord button is pressed, it sets focus to the last control on the form and presses the tab key which takes it to the first box up the form. have a look at the attached sample with your suggested sollution.
 

Attachments

jg,

This worked:

DoCmd.GoToControl ("Name")
DoCmd.GoToRecord , , acNewRec

Wayne
 

Users who are viewing this thread

Back
Top Bottom