Opening a blank form.

  • Thread starter Thread starter Nick Noone
  • Start date Start date
N

Nick Noone

When I open a form it shows the last entered
information... How can I set a form to open with blank
information?
 
If you only want to enter new records, open it in Data Entry mode.
Open the form in design view, and set its DataEntry property to Yes.
If you are opening it programatically:
DoCmd.OpenForm "MyForm", DataMode:=acFormAdd

If you want to open the form with all records, and go to a new one:
DoCmd.OpenForm "MyForm"
With Forms("MyForm")
If Not .NewRecord Then
.SetFocus
RunCommand acCmdRecordsGotoNew
End If
End With
 
Nick Noone said:
When I open a form it shows the last entered
information... How can I set a form to open with blank
information?

Two ways I use depending on my needs.

You can open the form in DataEntry mode. This opens the form only exposing a new
blank record so users can make new entries. Existing entries can still be seen if
the user selects "Remove All Filters" from the main menu.

You can base the form on a query against your table with impossible criteria (like
1=0). It will open as above, but the user will not have any way to access previous
records.
 
Back
Top