ewaldt at gdls.com
ewaldt at gdls.com
Tue Jun 10 09:41:05 CDT 2014
I have a form (frmTreeView), that includes a subform. The subform has two possible source objects, each being a form within the application (sfrmTable1, and sfrmData); these are switched by the user via a command button. sfrmTable1 is a simple datasheet view of a query. If sfrmTable1 is the current source object for the subform, the user can move columns around, make the visible or invisible, size them, etc. If the user then closes the parent form (with sfrmTable1 still showing), a pop-up asks if he/she wants to save the format of sfrmTable1. If the user responds in the affirmative, sfrmTable1 is saved as it was reformatted, and it will appear that way next time. If, however, the user does not close the form but uses the command button to switch the subform's source object to sfrmData, then the formatting is lost. When the parent form is closed, the pop-up will again be displayed, but it's meaningless; the formatting has already been lost, and the user will only be saving the form in the format it already had. OK, sorry - long intro. What I want to happen is simply that the user's changes are saved automatically, without his/her ever being asked. No pop-ups, and no lost formatting. Is there a way to do this? I've tried saving sfrmTable1 (have to open it separately, and it does not reflect the new formatting anyway), using SendKeys (because ctrl+S works sometimes; doesn't seem to be consistent, though). Any other ideas? If there's some code to use, I could simply place it in the code behind the command button Thanks for reading this lengthy cry for help, and thanks in advance for any help you can give me. Tom Ewald Mass Properties General Dynamics Land Systems