I know that I can do this using a temp table, but I'm hoping for another solution that would be easier. I want to be able to open a form (in continuous view) with the current data and play with the data without the changes being saved. This includes being able to change records. I would then have Cancel and Save buttons. The cancel button would just close the form without making any changes to the data. The save button would replace the existing data with the information that is in the form. I tried using the Snapshot recordset type in the form properties, but that doesn't allow you to make any changes to the controls. Like I said, I know that I could load the data into a temp table so that all my changes, while being "saved" wouldn't change the main table and then Cancel would just empty the temp table and Save would copy the changes to the main table.
One note... With my idea, I would only be editing records, not adding or deleting. Not sure if this makes any difference.
I just want to be able to take a picture of my data, edit the picture and then choose whether or not to save my changes without being prompted for each record, but instead as a whole recordset. Hope this makes sense.
Use a transaction workspace on the bound form.
Been doing this since ACC2003 based upon the ACC2000 model as described here: ACC2000: How to Control Bound Form Transactions in Access Databases
Of course, change all of the DAO3.6 references to the newer jet/ace type for ACC2007/2010 (Microsoft Office Acces 14 or something like that... I'm on the iPad writing now so no office!)
Works slicker than whale-poop-on-ice. (^_^)
HOWEVER, I HIGHLY ADVISE USING A COPY OR TEST DATABASE the first time thru with this... boy did I make a mess of things the first try... and I even used the Northwinds.MDB file.
7 2089
I have a radical approach which in Theory I do believe should work although I have never tried it myself and I would venture to say that no one else has either. Here goes my Logic. - Create an ADODB Disconnected Recordset.
- Assign this Recordset to the Recordset Property of your Form.
- Make as many changes as you like.
- Should you wish to Save (Save) your most recent change(s), Reconnect the Recordset to the Data Source.
- To discard (Cancel) ALL changes, simply leave the Recordset disconnected and Close the Connection Object.
- Again, strictly theoretical at this point.
zmbd 5,501
Expert Mod 4TB
Use a transaction workspace on the bound form.
Been doing this since ACC2003 based upon the ACC2000 model as described here: ACC2000: How to Control Bound Form Transactions in Access Databases
Of course, change all of the DAO3.6 references to the newer jet/ace type for ACC2007/2010 (Microsoft Office Acces 14 or something like that... I'm on the iPad writing now so no office!)
Works slicker than whale-poop-on-ice. (^_^)
HOWEVER, I HIGHLY ADVISE USING A COPY OR TEST DATABASE the first time thru with this... boy did I make a mess of things the first try... and I even used the Northwinds.MDB file.
Seth,
Is this in a single-user environment? This may not be workable in a multi-user environment without locking users out of the affected rows during the "play" time.
Jim
This is a multi-user environment. Record locking shouldn't be a problem. Thanks-for the heads-up. I will look at both of these solutions tomorrow at work.
Thanks Z. That works perfectly. The instructions were very easy to follow and I've got it implemented as given in the example. Now I'll just tweak it a little so that the user can click Save or Cancel buttons and have it then do the roll-back or the commit and not prompt on closing.
Just curious, in the example given in your link, couldn't you get rid of the boolFrmSaved variable and just replace it with the boolFrmDirty variable? I didn't see anywhere in the code that the functions needed to be separated. The Form_Unload event used them separately, but I would think that instead of testing for If Me.Saved ..., just test for If Me.Dirtied. Not that it makes a huge difference, but I was just wondering if there was a reason that I was missing.
zmbd 5,501
Expert Mod 4TB
Seth, glad this worked for you. I've never actually tried to improve on this code so to answer your second question IDK. (^_^) - If you want an indepth anlysis of the code you should start a new thread with link back to this one if you desire.
It actually became useful to me when I added my Cancel and Save buttons, so I'll skip that discussion for now. Thanks again.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: AaronV |
last post by:
I've seen a few sites that offer this, but I'm not sure how they do it.
It's a form button, that when pressed, prompts the use to download a
file. Like if I want my banking records, I select a date...
|
by: Dev |
last post by:
Dear Friends,
I am passing the image name, size (in bytes) and imgaeformat (like jpg or bmp or pdf) through the network.
I want display the image into picturebox without saving image...
|
by: Mark Denardo |
last post by:
My question is similar to one someone posted a few months back, but I don't
see any replies.
Basically I want to be able to have users upload photos and save them in a
database (as byte data)...
|
by: ClearCut |
last post by:
I have written a program in VB6 that opens an existing Word document and adds some text to the top of the document before printing it. Now I want to close the document without saving the changes. ...
|
by: PetyaNic |
last post by:
Hello,
I'm a very beginner in Javascript and sorry if my question sounds stupidly.
I want to print a page without showing the print window and without saving the page as a file. I want the user...
|
by: Karl |
last post by:
Hi all,
It may seem like a rather odd request (or not) but I would like to be
able to create a file (doc, jpg, xls or one of many other files that
can be automated) on a website and stream it to...
|
by: prn |
last post by:
Hi all,
Among other things, I maintain an Access application that I have inherited from about a half-dozen previous maintainers. :(
I got a call from one of the users to the effect that one of...
|
by: TheSmileyCoder |
last post by:
I have a form, which I open in dialog mode, and through the openArgs I set some values in the form (in a new record) thus dirtying the form.
The idea is then that the user should make a selection...
|
by: lorax |
last post by:
I am new to this. I am recreating a form from ACCESS 2000 in Access 2010. The problem is that ACCESS no longer allow one to close a form without saving it.
Form: a search form that allows people...
|
by: NeoPa |
last post by:
Introduction :
This article relates to the long-standing (Since at least Access 2.0.) problem whereby a Form, used within a Subform of another (main) Form, will have any temporary and transient...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |