I have a command button that opens up a form. How do I
1. get the form to open up to a new record
2. get the form to open up only to a new record i.e. make previous records invisible/un-editable
For option 1, go to design mode on the form. Open up the form properties and click on the 'Event' tab, scroll down to 'On Load' and build a procedure in the Code Builder. This is the code you need to go to a new record on form open.
Code:
Private Sub Form_Load()
DoCmd.GoToRecord acDataForm, "Elements", acNewRec
End Sub
For option 2, in that same form properties popup, click on the 'Data' tab and set 'Data Entry' to 'Yes'.