Another Combo Box Problem

  • Thread starter Thread starter Mikewl
  • Start date Start date
M

Mikewl

Guest
I'm using a combo box to pick a customers name and phone number from one table to fill in the same fields on a second table.

If it's a new customer, how can I get the combo box to update the first table and still add the data to the second table?
Thanks.
 
First of all why are you storing redundant data? Two tables should not have the same information in them, that is what relationships and primary keys are for. Anyway, off my database normalization horse and to answer your question.

I will give you my way of doing it, although I am sure there are other ways. Create a small form with the form wizard that will fill in all the fields on table one. Next on the combobox "on not in list" Event Procedure write the following commands:

Private Sub yourcombobox_NotInList(NewData As String, Response As Integer)

docmd.OpenForm "yournewformhere"

end sub

This will open your new form, you can type the new customer in. At that point go to your original forms property and on the GotFocus event type:

me.refresh

Hope That Helps
Robert
 

Users who are viewing this thread

Back
Top Bottom