open form to blank records

  • Thread starter klp via AccessMonster.com
  • Start date
K

klp via AccessMonster.com

I have looked on the message board for this posting and have found answers.
They are the same answers that I have tried but my solution is not working.

Here is the problem.

I have a form where I want to open up to blank records. These records are
only to viewed, not edited or added. I put this logic DoCmd.GoToRecord , ,
acNewRec in the OnOpen event and also tried the OnLoad event of the form.
I've also referenced the form frmCustomers in the statement. I get this error
of "Can't go to specified record". What could be causing this error?

Thanks in advanced.

Kim P
 
A

Allen Browne

If you don't need to see the old records, just set the form's Data Entry
property to Yes. Of if you open the form programmatically, use:
DoCmd.OpenForm "Form1", DataMode:=acFormAdd

If you do want to load the old records, but jump to the new record, use:

Private Sub Form_Load()
If Not Me.NewRecord Then
RunCommand acCmdRecordsGotoNew
End If
End Sub
 
K

klp via AccessMonster.com

Thank you so much!

Allen said:
If you don't need to see the old records, just set the form's Data Entry
property to Yes. Of if you open the form programmatically, use:
DoCmd.OpenForm "Form1", DataMode:=acFormAdd

If you do want to load the old records, but jump to the new record, use:

Private Sub Form_Load()
If Not Me.NewRecord Then
RunCommand acCmdRecordsGotoNew
End If
End Sub
I have looked on the message board for this posting and have found answers.
They are the same answers that I have tried but my solution is not
[quoted text clipped - 9 lines]
error
of "Can't go to specified record". What could be causing this error?
 
K

klp via AccessMonster.com

Thank you so much!

Allen said:
If you don't need to see the old records, just set the form's Data Entry
property to Yes. Of if you open the form programmatically, use:
DoCmd.OpenForm "Form1", DataMode:=acFormAdd

If you do want to load the old records, but jump to the new record, use:

Private Sub Form_Load()
If Not Me.NewRecord Then
RunCommand acCmdRecordsGotoNew
End If
End Sub
I have looked on the message board for this posting and have found answers.
They are the same answers that I have tried but my solution is not
[quoted text clipped - 9 lines]
error
of "Can't go to specified record". What could be causing this error?
 
K

klp via AccessMonster.com

Thank you so much!

Allen said:
If you don't need to see the old records, just set the form's Data Entry
property to Yes. Of if you open the form programmatically, use:
DoCmd.OpenForm "Form1", DataMode:=acFormAdd

If you do want to load the old records, but jump to the new record, use:

Private Sub Form_Load()
If Not Me.NewRecord Then
RunCommand acCmdRecordsGotoNew
End If
End Sub
I have looked on the message board for this posting and have found answers.
They are the same answers that I have tried but my solution is not
[quoted text clipped - 9 lines]
error
of "Can't go to specified record". What could be causing this error?
 

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

Top