OpenForm and MoveLast

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I get the following pseudo code working?

OpenForm.Maximize - this actully works, I know
Me.MoveLast + 1 - Move to last record of the source table plus start
the Add New Record function
 
It's not clear; do you want to go to the last entry or a new entry?
Using the form's On Load event procedure:

'go to last record
DoCmd.GoToRecord , , acLast

'go to new record
DoCmd.GoToRecord , , acNewRec

HTH,
Brian
 
You don't need to move to the last record - just move to a new record:

docmd.GoToRecord ,,acNewRec
 
Thank you.

Sandra Daigle said:
You don't need to move to the last record - just move to a new record:

docmd.GoToRecord ,,acNewRec

--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.


Ed said:
How do I get the following pseudo code working?

OpenForm.Maximize - this actully works, I know
Me.MoveLast + 1 - Move to last record of the source table plus
start the Add New Record function
 
Thank you. I really only needed to go to New Entry. i was using psuedo code
from the forms' record buttons on the bottom.

Thanks again.
 
further to this question, I'm trying to add a new record inside a subform,
when I use the below command on a onClick, it adds a new record to the main
table, not the subform.

Basically, i'm looking to create a button that will automatically fill in
the details for a new record.

Sandra Daigle said:
You don't need to move to the last record - just move to a new record:

docmd.GoToRecord ,,acNewRec

--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.


Ed said:
How do I get the following pseudo code working?

OpenForm.Maximize - this actully works, I know
Me.MoveLast + 1 - Move to last record of the source table plus
start the Add New Record function
 
Back
Top