From: Mark Kubicki on 22 Feb 2010 18:42 On a form, I have a combobox that allows the user to select a "pre-set" set of options for a report (the predetermined options have titles like: Draft, Working Copy, Preliminary Issue, Final...) But the user also needs to have the option of modifying the report details, or creating an new set of them. To facilitate this, I have on the main form a command button that opens a pop-up / modal form which displays the the details of the selected preset, and also offers the same list of "pre-set" (so the user can change thei selection at this time). It also allows the user to edit the details (the details are items like: include this item or not?, use today's date or some other date?, etc...) The problem is: For the main form to display the current pre-set selection (stored in a table of preferences), the table must be attached to the form, and, consequently is open (?) ) When I open the pop-up form, it is uses the same table; so that when i go to close the pop-up, i get a warning that the table has been edited by another user. Choosing "save changes anyway" results in the correct item being displayed in combobox on the main form, and changes made to the record in the active form (main, or pop-up) will always override the any previous entry (yes, i realize that this is sloppy structure, but it does align with the way the users had previously been working) I thought I could simply add the command: DoCmd.SetWarnings False, but that is not working: I still get the warning. How can I turn it off (and then, back on --of course) and set the presumed answer to accept changes... any thoughts wouldbe greatly appreciated thqanks in advance, mark
From: Maurice on 24 Feb 2010 07:59 Your form is set to dirty so try setting it to me.dirty = false before the form closes that should take care of the warning -- Maurice Ausum "Mark Kubicki" wrote: > On a form, I have a combobox that allows the user to select a "pre-set" set > of options for a report (the predetermined options have titles like: Draft, > Working Copy, Preliminary Issue, Final...) > But the user also needs to have the option of modifying the report details, > or creating an new set of them. To facilitate this, I have on the main form > a command button that opens a pop-up / modal form which displays the the > details of the selected preset, and also offers the same list of "pre-set" > (so the user can change thei selection at this time). It also allows the > user to edit the details (the details are items like: include this item or > not?, use today's date or some other date?, etc...) > > The problem is: > For the main form to display the current pre-set selection (stored in a > table of preferences), the table must be attached to the form, and, > consequently is open (?) ) > When I open the pop-up form, it is uses the same table; so that when i go to > close the pop-up, i get a warning that the table has been edited by another > user. > Choosing "save changes anyway" results in the correct item being displayed > in combobox on the main form, and changes made to the record in the active > form (main, or pop-up) will always override the any previous entry (yes, i > realize that this is sloppy structure, but it does align with the way the > users had previously been working) > > I thought I could simply add the command: DoCmd.SetWarnings False, but that > is not working: I still get the warning. > > How can I turn it off (and then, back on --of course) and set the presumed > answer to accept changes... > > > any thoughts wouldbe greatly appreciated > thqanks in advance, > mark > > > . >
|
Pages: 1 Prev: Zooming in on a picture on a form Next: Dynamically moving from one form to another |