Form Question

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

Guest

I have created a form that updates data in a table. Each time I close and
reopen the form, it displays the data from the first recordn in the table. I
want the fields to be blank when the form is opened. Can someone tell me how
to do this please?

Paul
 
I have created a form that updates data in a table. Each time I close and
reopen the form, it displays the data from the first recordn in the table. I
want the fields to be blank when the form is opened. Can someone tell me how
to do this please?

Paul

Two ways:

1. Set the Form's Data Entry property to TRUE.

This has the disadvantage that the existing records will not be
visible, *ONLY* the new record.

2. Put VBA code in the form's Load event:

Private Sub Form_Load(Cancel as Integer)
DoCmd.GoToRecord, , acNewRec
End Sub

John W. Vinson[MVP]
 
Thanks John!

John Vinson said:
Two ways:

1. Set the Form's Data Entry property to TRUE.

This has the disadvantage that the existing records will not be
visible, *ONLY* the new record.

2. Put VBA code in the form's Load event:

Private Sub Form_Load(Cancel as Integer)
DoCmd.GoToRecord, , acNewRec
End Sub

John W. Vinson[MVP]
 
Back
Top