Open to Blank Form

K

Kelly

I feel like an iddiot...but Im pretty good with Access. I want my form to
open to a blank form, but still allow me to view other records. Ive searched
all the questions and have tried all recommendations below. But nothing is
working. I still get my first record instead of a blank form. There is a
sub form as part of the form, does that have anything to do with it? This is
crazy!

Private Sub Form_Load()
DoCmd.GoToRecord , , acNewRecord
End Sub


DoCmd.OpenForm "YourForm"
DoCmd.GoToRecord , , acNewRec

Private Sub Form_Load()
DoCmd.GoToRecord , , acNewRec
End Sub

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

Private Sub Form_Load()
If Not Me.NewRecord Then
RunCommand acCmdRecordsGoToNew
End If
End Sub
 
J

June7 via AccessMonster.com

Is the form's AllowAdditions property set to yes?
I feel like an iddiot...but Im pretty good with Access. I want my form to
open to a blank form, but still allow me to view other records. Ive searched
all the questions and have tried all recommendations below. But nothing is
working. I still get my first record instead of a blank form. There is a
sub form as part of the form, does that have anything to do with it? This is
crazy!

Private Sub Form_Load()
DoCmd.GoToRecord , , acNewRecord
End Sub

DoCmd.OpenForm "YourForm"
DoCmd.GoToRecord , , acNewRec

Private Sub Form_Load()
DoCmd.GoToRecord , , acNewRec
End Sub

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

Private Sub Form_Load()
If Not Me.NewRecord Then
RunCommand acCmdRecordsGoToNew
End If
End Sub
 
J

June7 via AccessMonster.com

The subform should not be a problem. I just tested a form with one and worked
fine. If the AllowAdditions property were not set to yes you should get error
message but since you don't mention one that can't be the problem. Very odd
because I see nothing wrong with your code.
Is the form's AllowAdditions property set to yes?
I feel like an iddiot...but Im pretty good with Access. I want my form to
open to a blank form, but still allow me to view other records. Ive searched
[quoted text clipped - 23 lines]
End If
End Sub
 
J

June7 via AccessMonster.com

Correction to my last comments: acNewRecord in the Load event should be
acNewRec
The subform should not be a problem. I just tested a form with one and worked
fine. If the AllowAdditions property were not set to yes you should get error
message but since you don't mention one that can't be the problem. Very odd
because I see nothing wrong with your code.
Is the form's AllowAdditions property set to yes?
[quoted text clipped - 3 lines]
 
K

Kelly

Yeah, I've double checked everything...for the life of me I cant figure it
out.
--
Kelly


June7 via AccessMonster.com said:
Correction to my last comments: acNewRecord in the Load event should be
acNewRec
The subform should not be a problem. I just tested a form with one and worked
fine. If the AllowAdditions property were not set to yes you should get error
message but since you don't mention one that can't be the problem. Very odd
because I see nothing wrong with your code.
Is the form's AllowAdditions property set to yes?
[quoted text clipped - 3 lines]
End If
End Sub
 
J

Jeanette Cunningham

Hi Kelly
Does this form have a record source that allows edits.
If you opened the query that is the record source for this form, would it
let you add a new record to the query?


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 

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