View Full Version : opening form in next available record automatically?


joed
04-06-2000, 02:38 AM
How do I get my data base to open in the next available blank record as opposed to always opening with record # 1 ?

R. Hicks
04-06-2000, 04:29 AM
Open your form in design view, change the Data Entry property in the the form's property list to YES. This will make your form open to a new record each time it's opened.

HTH
RDH

joed
04-06-2000, 08:03 AM
I tried doing that, but now all I get now is the first available blank field but all of my other records are gone.

I have 47 records and what I want to do is open my form making the next avaiable blank form to be the #48 record. Then I could enter my next data entry in there. Please help!
Thanks in advance.
Joed

R. Hicks
04-06-2000, 02:03 PM
Well, try this.
Add the following code to the On Open event of the form:

Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToRecord acDataForm, "yourFormName", acNewRec
End Sub

Change "yourFormName" (must have quotes) to the name of your form.

HTH
RDH

[This message has been edited by R. Hicks (edited 04-06-2000).]