I am building a simple sales record database for my wife who sells Watkins products.
I have a main form that lists all her customers. I open an Order Entry form using an OpenArg to pass the CustomerID to the order form and insert that value in the CustID field. Everything works fine except for the next record button at the bottom. If I click the next button, the form will automatically insert and save an new record for the customer instead of coming to an empty record with the next button grayed out. I can keep clicking the record and it will keep adding new empty records.
I also have a search box on the Order form so my wife can look at past orders for a customer. If I open this form off the main form, then use the search to go to a specific customer that has two records, I see the OpenArgs behave even stranger. I can click the next record button and the form will cycle through two records as it should. Then, if I click the next button a third time it will change the user ID to the first user ID on my main form and add an empty record. I forced my main form to close when the Order form opens but I still get the same behavior.
However, If I open the form from the navigation pane whole the main form is closed, the form will work like normal and the next buttons will stop at a new record.
My wife isn't real computer savvy and I am afraid she's going to end up inserting a bunch of empty records.
Why is the Open Argument doing this?
I have a main form that lists all her customers. I open an Order Entry form using an OpenArg to pass the CustomerID to the order form and insert that value in the CustID field. Everything works fine except for the next record button at the bottom. If I click the next button, the form will automatically insert and save an new record for the customer instead of coming to an empty record with the next button grayed out. I can keep clicking the record and it will keep adding new empty records.
I also have a search box on the Order form so my wife can look at past orders for a customer. If I open this form off the main form, then use the search to go to a specific customer that has two records, I see the OpenArgs behave even stranger. I can click the next record button and the form will cycle through two records as it should. Then, if I click the next button a third time it will change the user ID to the first user ID on my main form and add an empty record. I forced my main form to close when the Order form opens but I still get the same behavior.
However, If I open the form from the navigation pane whole the main form is closed, the form will work like normal and the next buttons will stop at a new record.
My wife isn't real computer savvy and I am afraid she's going to end up inserting a bunch of empty records.
Why is the Open Argument doing this?