Starting Record

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

Guest

I have a form which is the front end of a table. The form always begins with
the first record in the table which is in this case a project number. I
would like the form to always open with the next available number (they are
sequential). Anyone have any ideas on how this can be done.

Jeff
 
Jeff,
Your next available record is a New record.
When you open the form...
DoCmd.OpenForm "frmYourForm"
DoCmd.GoToRecord , , acNewRec
hth
Al Camp
 
I have a form which is the front end of a table. The form always begins with
the first record in the table which is in this case a project number. I
would like the form to always open with the next available number (they are
sequential). Anyone have any ideas on how this can be done.
One way is to set the DataEntry property of the Form to True. This is
a bit annoying because it ONLY lets you do data entry - you can't go
back and view previously entered records.

Al's suggested code is a bit better for this reason. To enter it, open
the Form in design view; view its Properties; and click the ... icon
by the Open event on the Events tab. Invoke the Code Builder. Access
will give you a Sub and End Sub line; put Al's code in between these
lines.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top