Hi, all!
I'm struggling with a small, yet very crucial form. The form in question enables users to add products to an account.
The products are made up of a primary type, and a sub type. These two product types are stored in their own tables, and feed into synchronized combo boxes on the form. When the user opens the form from the account screen, it pre-fills the account number (which is passed to the account/product table, to which the form is bound), displays the account name via an unbound box with a DLookup, and allows the user to create a product by choosing the two classes, and clicking the save button. Results then display in the subform below.
The problem I'm having is that if I open the form and then close it, even without doing anything, it's creating a record on my account/product table with the auto# primary key, and the rest of the record blank. Aside from a waste of space, this is then causing Error messages to display in my subform.
I've tried some different techniques in VBA that I saw online, but nothing has worked quite right for me. I'm trying to keep a record from generating until the user manually saves it. Does anyone have any suggestions?