|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Q: RejectChanges problemCan anybody suggest how to get round the following problem? I have a form (form A for the sake of argument) which accepts data to be put into a DataTable. If the cancel button is pressed, I call RejectChanges to prevent the inputted data being passed to the DataTable. However, I also have a button on the form which calls another form (which I'll refer to as form B) which can also populate the table. In this form there is also a cancel button to which I call RejectChanges i.e. in order that the data inputted in its form can be rejected. The problem is this, if the user inputs data in form A, and then enters form B and inputs some data, but then decides that the last set of data is wrong and presses Cancel then ALL the data is lost i.e. that from A and B (where the intention is to only lose that from form B). Now, I don't want to write any data to the database that the table is attached to i.e. I don't want to use Update until the user leaves form A (by pressing "OK" or something). Can you see my problem? What I think I need is some way to say that the data in B can be lost but without losing anything from A. Almost a "partial reject changes". Is there such a thing? Hope somebody can help. Geoff Yes, make the second form open in Modal, this will prevent you from
accessing form A until you finish with form B. Show quoteHide quote "Geoff" <nodamnspam@email.com> wrote in message news:YqmdnXjAPuB06XLenZ2dnUVZ8qWdnZ2d@pipex.net... > Hi > > Can anybody suggest how to get round the following problem? > > I have a form (form A for the sake of argument) which accepts data to be > put into a DataTable. If the cancel button is pressed, I call > RejectChanges to prevent the inputted data being passed to the DataTable. > However, I also have a button on the form which calls another form (which > I'll refer to as form B) which can also populate the table. In this form > there is also a cancel button to which I call RejectChanges i.e. in order > that the data inputted in its form can be rejected. > > The problem is this, if the user inputs data in form A, and then enters > form B and inputs some data, but then decides that the last set of data is > wrong and presses Cancel then ALL the data is lost i.e. that from A and B > (where the intention is to only lose that from form B). > > Now, I don't want to write any data to the database that the table is > attached to i.e. I don't want to use Update until the user leaves form A > (by pressing "OK" or something). > > Can you see my problem? What I think I need is some way to say that the > data in B can be lost but without losing anything from A. Almost a > "partial reject changes". Is there such a thing? > > Hope somebody can help. > > Geoff > > Hi Terry
I'm afraid I didn't explain myself too clearly. Basically form A and B have access to a global DataTable. If I make changes to the DataTable in A, enter B and make changes to the DataTable and then press Cancel (calling RejectChanges for the DataTable) I will also reject the changes made in form A - which is not intended i.e. all I want to do by pressing Cancel in form B is to reject the changes made in it. So, what I'm looking for is a way to reject the changes made in form B AND ONLY in form B. RejectChanges seems to clear everything. Can you help? Geoff Show quoteHide quote "Terry Burns" <m*@mine.com> wrote in message news:uR54ZcAMGHA.1032@TK2MSFTNGP11.phx.gbl... > Yes, make the second form open in Modal, this will prevent you from > accessing form A until you finish with form B. > > -- > Terry Burns > http://TrainingOn.net > > > "Geoff" <nodamnspam@email.com> wrote in message > news:YqmdnXjAPuB06XLenZ2dnUVZ8qWdnZ2d@pipex.net... >> Hi >> >> Can anybody suggest how to get round the following problem? >> >> I have a form (form A for the sake of argument) which accepts data to be >> put into a DataTable. If the cancel button is pressed, I call >> RejectChanges to prevent the inputted data being passed to the DataTable. >> However, I also have a button on the form which calls another form (which >> I'll refer to as form B) which can also populate the table. In this form >> there is also a cancel button to which I call RejectChanges i.e. in order >> that the data inputted in its form can be rejected. >> >> The problem is this, if the user inputs data in form A, and then enters >> form B and inputs some data, but then decides that the last set of data >> is wrong and presses Cancel then ALL the data is lost i.e. that from A >> and B (where the intention is to only lose that from form B). >> >> Now, I don't want to write any data to the database that the table is >> attached to i.e. I don't want to use Update until the user leaves form A >> (by pressing "OK" or something). >> >> Can you see my problem? What I think I need is some way to say that the >> data in B can be lost but without losing anything from A. Almost a >> "partial reject changes". Is there such a thing? >> >> Hope somebody can help. >> >> Geoff >> >> > > OK then you need two tables as it does not know who made the changes.
Show quoteHide quote "Geoff" <nodamnspam@email.com> wrote in message news:2PmdnUdIJJasOnLeRVnysg@pipex.net... > Hi Terry > > I'm afraid I didn't explain myself too clearly. Basically form A and B > have access to a global DataTable. If I make changes to the DataTable in > A, enter B and make changes to the DataTable and then press Cancel > (calling RejectChanges for the DataTable) I will also reject the changes > made in form A - which is not intended i.e. all I want to do by pressing > Cancel in form B is to reject the changes made in it. > > So, what I'm looking for is a way to reject the changes made in form B AND > ONLY in form B. RejectChanges seems to clear everything. > > Can you help? > > Geoff > > > "Terry Burns" <m*@mine.com> wrote in message > news:uR54ZcAMGHA.1032@TK2MSFTNGP11.phx.gbl... >> Yes, make the second form open in Modal, this will prevent you from >> accessing form A until you finish with form B. >> >> -- >> Terry Burns >> http://TrainingOn.net >> >> >> "Geoff" <nodamnspam@email.com> wrote in message >> news:YqmdnXjAPuB06XLenZ2dnUVZ8qWdnZ2d@pipex.net... >>> Hi >>> >>> Can anybody suggest how to get round the following problem? >>> >>> I have a form (form A for the sake of argument) which accepts data to be >>> put into a DataTable. If the cancel button is pressed, I call >>> RejectChanges to prevent the inputted data being passed to the >>> DataTable. However, I also have a button on the form which calls another >>> form (which I'll refer to as form B) which can also populate the table. >>> In this form there is also a cancel button to which I call RejectChanges >>> i.e. in order that the data inputted in its form can be rejected. >>> >>> The problem is this, if the user inputs data in form A, and then enters >>> form B and inputs some data, but then decides that the last set of data >>> is wrong and presses Cancel then ALL the data is lost i.e. that from A >>> and B (where the intention is to only lose that from form B). >>> >>> Now, I don't want to write any data to the database that the table is >>> attached to i.e. I don't want to use Update until the user leaves form A >>> (by pressing "OK" or something). >>> >>> Can you see my problem? What I think I need is some way to say that the >>> data in B can be lost but without losing anything from A. Almost a >>> "partial reject changes". Is there such a thing? >>> >>> Hope somebody can help. >>> >>> Geoff >>> >>> >> >> > >
Is there a difference between passing "" and passing Nothing to a Windows API ?
Moving a project from 2003 to 2005 UI Design question 2003 0r 2005 Time? Several TexBox in a form of an array Using GetOleDbSchemaTable and Visual Basic .NET for MS-Access and SQL Server Express TCP/IP Socket communication from multiple clients Help to Italy Need help with LastIndexOf |
|||||||||||||||||||||||