On form open go to new record for input

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

Guest

I have a DB that already has some data in it. In the text boxes that are on
the form when you open up the database it takes you and shows you the first
record in the DB.

I would like to make it go to a new record so that when the DB is open the
person is ready to go and to type. Which will add a new person to the end of
the DB.

Could someone help me out with this problem
 
pokdbz said:
I have a DB that already has some data in it. In the text boxes that are on
the form when you open up the database it takes you and shows you the first
record in the DB.

I would like to make it go to a new record so that when the DB is open the
person is ready to go and to type. Which will add a new person to the end of
the DB.

Could someone help me out with this problem

Set the form's Data Entry property to "Yes"
 
If you do not need the previous records loaded into the form, just set the
form's DataEntry property to Yes. If you open the form programatically, use:
DoCmd.OpenForm "MyForm", DataMode:=acFormAdd

If you do want the previous records loaded, use:
DoCmd.OpenForm "MyForm"
With Forms("MyForm")
If Not .NewRecord Then
RunCommand acCmdRecordsGotoNew
End If
End With
 
I have a DB that already has some data in it. In the text boxes that are
on
the form when you open up the database it takes you and shows you the
first
record in the DB.

I would like to make it go to a new record so that when the DB is open the
person is ready to go and to type. Which will add a new person to the end
of
the DB.

You could set the Form's Data Entry property to Yes, or in the OnLoad event,
you could say Me.Recordset.AddNew

--
Peace & happy computing,

Mike Labosh, MCSD

"It's 4:30 am. Do you know where your stack pointer is?"
 
Since you've been able to make this work, perhaps you can help me. I need my
subform to open to a new record at the beginning of a continuous form. I've
tried setting the Data Entry Property to "Yes" but that isn't working. I
tried typing in Me.Recordset.AddNew to the Event/OnLoad line in the property
sheet, but that doesn't work. I get the error "The macro (or its macro group)
doesn't exist, or the macro is new but hasn't been saved. I am not
experienced with macros, so I'm sure there is more that I need to do to make
this work... I just don't know what to do. Any help would be greatly
appreciated.

Thanks,
Tammy
 

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

Back
Top