Add a new record to a form RRS feed

  • Question

  • I am trying to have a new record open when yes is chosen with the following code, but it is not working:
            DoCmd.GoToRecord , , acNewRec

    What are some other options for adding a new record after opening the form?         

    Tuesday, February 6, 2018 9:59 PM

All replies

  • Use:

    DoCmd.GoToRecord acActiveDataObject, , acNewRec

    But it won't acutally add the record until one of its fields are completed.

    And make sure the forms 'Allow Additions' and 'Allow Edits' properties are set to 'Yes'.

    Tuesday, February 6, 2018 10:29 PM
  • That would be the normal means of navigating to an empty new record, but what do you mean  by 'when yes is chosen'?  Chosen where?

    And what do you mean by 'is not working'?  Do you get an error?  Does it simply not go to an empty new record? Or what?

    Ken Sheridan, Stafford, England

    Tuesday, February 6, 2018 10:56 PM