Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A new record from an index form 1

Status
Not open for further replies.

sagamw

Technical User
Nov 11, 2009
104
GR
Hi guys!

I have an index form (that you search your record with a FAYT listbox) and I have a "New record" button in it.

My code for the click event is
Code:
DoCmd.OpenForm FormName:="MyForm"
DoCmd.GoToRecord , , acNewRec

It works (it opens My Form, and it ir ready to receive data) BUT for a split second I am seeing the first record and THEN the blank form.

How can I avoid this, and have myform open directly to the blank state?
 
Hi Duane and thank you for your answer.

I was ready to question you some more, But I found the correct syntax my self! {{phew!}}

Here's a star for your pointers!

 
For anyone finding this thread, here an oneline solution:
DoCmd.OpenForm "MyForm", , , , acFormAdd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top