My situation is quite simple, a user is presented with a drop down menu (combo box) of customers, if the customer needed to fill the form is not present in the database already the user can click an "Add Customer" button which opens up a pop up form to enter the customer details and insert the new entry into the customers table.
I'm nit picking now but, if the user now wants to select the newly entered customer they must re-select the customer from the combo box which will now present a new entry, is there a way of automatically making the combo box default to the newly inserted customer with an "On Close" event on the pop up form?
This is the "On Close" code I already have which refreshes the customer combo box to add the new entry, is there anything I can add which will make it so the box defaults to the new customer entered?
Private Sub Form_Close()
If CurrentProject.AllForms("edit appointments").IsLoaded Then
Forms![edit appointments]!customerCombo.Requery
End If
If CurrentProject.AllForms("edit purchases").IsLoaded Then
Forms![edit purchases]!customerCombo.Requery
End If
End Sub