Opening Form and using Combo Box to lookup record

G

Guest

I have created a basic form to show customer details, and also allow for
editing of the customer information (I do not want users to be able to ADD in
this screen).

In order for users to be able to select a customer I have added a Combo box
that shows the Customer names. When a user chooses the customer name the
rest of the details are shown on the form.

My issue - When the form opens it is showing the details of the last
Customer added (I think), instead of being completely blank.

Is there any way to have this come up and being blank on opening the form?


Regards

James
 
A

Allen Browne

If you always want the form to open to a new record, use the Load event of
the form:

Private Sub Form_Load()
If Not Me.NewRecord Then
RunCommand acCmdRecordsGotoNew
End If
End Sub

You could also open the form in data entry mode, but you would then need to
modify your navigation combo's code so that it turns off the form's FilterOn
property.
 

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