Best Way to Open Blank Form?

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

Guest

I have a form with combox boxes, listbox and some fields with Dsums in their
controlsource properties. The form is bound to a table and everytime I open
the form, the first record is displayed.

I've tried to use the DataEntry= Yes on FOrm LOad event. Also, I've locked
all the fields except for 2 combo boxes which allow me to search for the
record. After finding the record, then I can Click on the Edit button which
will unlock all the fields.

However, my problem is at which point to set the DataEntry back to No. When
I set it after updating the combo box, the first record will appear and my
selection in the combox box "disappears" and I have to select again. Also my
textboxes with the Dsums show either #Name? or #Error.

Is there a better way of doing this? Thanks.
ck
 
If you want to load the form with all records, but display the new record,
try this code in the Load event procedure of the form:

Private Sub Form_Load()
If Not Me.NewRecord Then
RunCommand acCmdRecordsGoToNew
End If
End Sub
 
Thanks, Allen. I wanted to load the form without displaying any record at all
- a blank form because loading a form and then displaying records right away
kinda confuses my users..
ck
 
Back
Top