I have 3 cmd buttons (undo changes, clear order and save order). They worked great until I added a second subform and moved some controls around...Now I'm having difficulty getting them to work again on either of the subforms, only works ont the main form. The two subforms are bridged together to the Main form through a text control..
Has any experienced this and can direct me how to get them working again? thanks. Better yet,does anyone have a routine for either cmd button that actually works?
I hadn't thought of that at all....I think you're saying put this behind the Undo cmd button just to see if it will work?
Long term, could this cause a problem somewhere else inthe code?...
Ok GeorgeV, I just tried it with this and typing data into controls on the Main and on 'Order_Ship_Details_Subform':
Private Sub undochanges_Click()
I immediately got the msg, "you're about to delete 1 record"...(I wasn't expecting that), I clicked OK, then it errored out with this runtime error '2046' that says "the command or action Undo isn't available....
The one record it deleted was in 'Me.Order_Ship_Details_Subform' only, the data I typed on the Main form is still there. If I could get this to work properly (for clearing the 'old' data on subforms) it could become my "begin new order" cmd button and I could leave my combo box (on Main form for customer name selection) as it is....My concern is that the error msg means it's removing a record from the table and that's not my goal....
If you delete the record then you have nothing left to undo!
I didn't predict that behavior... Hummm - where's PK when you need him
Back to the drawing board on this one methinks (unless someone else steps in heroically with a new suggestion). I'll perhaps take a look at this too if you upload your db in your other thread suggested (simply provide a link to the upload in this one - no need to upload twice!)
Essentially is a method allowing me to send you my zip'd or rar'd db in it's entirety via email.
Wikepedia - file format standard for personal data interchange, specifically electronic business cards. vCards are often attached to e-mail messages, but can be exchanged in other ways, such as on the World Wide Web. They can contain name and address information, phone numbers, URLs, logos, photographs, and even audio clips.
Anyway, my db is so big, .......but OK,,,,I'll go try to scale it down for attachment. thanks.
I've left the Main form, Add an Order and Details (with tables/queries) and two subforms.....
I think I've got it pretty much working the way I want it with some minor issues:
1) Those cmd buttons (Undo, Clear and Save),,,,still have issues
2.) The Details SubTotal (in Subform on the left)for some reason, error's for a few moments which also causes errors in my 'AOrderTotal' , 'TheOrderTotal' and 'SalesTaxAlone' in Subform on right...... then when I click on the Sales Tax control....the #Error's go away...it's a timing thing I haven't figured out yet.
Oh well have a go,,,I'll get some P.G. tips whilst you're at it. thanks
Wait,,,I'm getting a failure a couple times on the upload.
will try again..