Access 2007, not compiled, not split, Windows 7, Moderately Skilled
I have a Combobox at the top of my Vendor form. You pick the Vendor Name from the box and it displays the Vendor information below.
I have a command button on my main form "Add New Vendor" - On Click:
DoCmd.GoToRecord , , acNewRec (The form fields clear and are ready to recieve new vendor info.)
But the combo box, at the top, still retains the previous Customers Name. I would like to force the combo box to go to a new record as well.
MyComboBoxName docmd.gotorecord, , acNewRec (code I would like to add but don't know how.)
MsgBox "Enter Vendor name and data.", vbOKOnly, "Enter New Vendor"
Forms![frm_main]![SubFrm_Vendors]!VendorName.SetFocus
After the new Vendor Name is entered, the new record saves and the form refreshes to the new Vendor on the form and in the Combo Box.
In VBA is there a way to reference a specific control, on a form (combobox), and force it to a new record?
PHred