Go To...

  • Thread starter Thread starter alex
  • Start date Start date
A

alex

I have a Form that encompasses more than a full screen, i.e., users
need to use the V scroll bar.

I have a command button at the bottom of my form for adding a new
record.
When a user triggers the add new record, however, the focus/cursor
does not automatically go to the first record.

What's the best way to solve this problem?
Can I add code directly to the on click event procedure for the add
new record?

As always,
Thanks for the help

alex
 
I use the GoToControl command after adding a record

DoCmd.GoToRecord , , acNewRec
DoCmd.GoToControl "Caller" '<-- change caller to the name of your
control (the name of your text box, combo box, etc.).


Bryan
 
I use the GoToControl command after adding a record

DoCmd.GoToRecord , , acNewRec
DoCmd.GoToControl "Caller" '<-- change caller to the name of your
control (the name of your text box, combo box, etc.).

Bryan









- Show quoted text -

Thanks Bryan for your help.
I tried exactly what you suggested...I get a compile error: Argument
not optional

alex
 
Thanks Bryan for your help.
I tried exactly what you suggested...I get a compile error: Argument
not optional

alex- Hide quoted text -

- Show quoted text -

Bryan

I think I got it to work...I needed () and ""
 
Bryan

I think I got it to work...I needed () and ""- Hide quoted text -

- Show quoted text -

Bryan,

Before I go to the control, is there a way (code) to 'go to top of
page.'
Reason: when i go to the control, there's other labels at the top
that i would like to be displayed.

alex
 
Never needed to do that. That sounds hard.

Try this after the GoToControl:

DoCmd.GoToPage (1)


B..
 

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

Back
Top