Best Way to Open Blank Form?

C

CK

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
 
A

Allen Browne

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
 
C

CK

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top