473,378 Members | 1,333 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

acCmdUndo 3 different behaviors!!

The application I'm developing allows the user to edit fields. If a field has changed when the user clicks on a different control (or another record in the multi-record subform), a messagebox gives the user the option to save, undo or cancel. The problem is with the undo:

I'm testing it with repeated edits in a single field; I edit the field, click on another control or record and select undo ("no"). The first time, the undo works fine.

I edit the field again and click elsewhere, select undo from the message box and I get an error that "the command or action undo isn't available".

I cancel the error message dialog box and edit the field again, click elsewhere. This time the undo deletes the entire edited field.

Please help.

All of the data and the code are in a subform:

Private Sub Form_AfterUpdate()
Dim intYesNo As Integer
intYesNo = MsgBox("Yes to Save, No to Delete Record", vbQuestion + vbYesNoCancel, "Enter")
If intYesNo = vbYes Then
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
ElseIf intYesNo = vbNo Then

'the debugger brings me to this line when I get the error message
DoCmd.RunCommand acCmdUndo
End If
End Sub
Nov 1 '08 #1
1 3093
More question related to the last question.

I have also tried to use Me.undo in the subform, instead of acCmdUndo. When I test it in the subform as a free-standing form it works fine. But when I test it in the subform as part of the "master form" it does NOTHING.

Ideas?

Thanks
Nov 1 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

137
by: Philippe C. Martin | last post by:
I apologize in advance for launching this post but I might get enlightment somehow (PS: I am _very_ agnostic ;-). - 1) I do not consider my intelligence/education above average - 2) I am very...
1
by: Weston C | last post by:
I'm working on a small javascript application where I'd like to get one behavior when a user clicks on an image (image swap), but when they simply hold down the mouse button for a second, they get...
3
by: VB Programmer | last post by:
I have a usercontrol that is basically a webapp-wide menu (dropdownlists, etc...) Is there a way I can program a certain dropdownlist in the uc to act differently BASED on who is currently using...
1
by: Stephanie Stowe | last post by:
Hi. I have a problem that I am trying to troubleshoot on a client's production (*sigh*) servers. On one server, we will call web2 all works well. On another server, we will call web1, the client...
4
by: David Abrahams | last post by:
I'm seeing highly surprising (and different!) behaviors of PyImport_ImportModule on Linux and Windows when used in a program with python embedding. On Linux, when attempting to import a module...
4
by: yannis.corre | last post by:
Hello, I don't understand the difference of behavior of these two webservers : I'm uploading a file and I launch a thread that makes some treatments with the Request.Files. I saw that a new...
1
by: Wessidemike | last post by:
I'm trying to add a popup window to a img when i get this error <A> onClick is not a valid event for the IMG tag. Please check for spelling errors, or choose a different browser or specification from...
7
by: dantebothermy | last post by:
In the data entry area of my access application, I give users an opportunity to undo. The same code gives me three different behaviors. When I first test it, it works fine. But if I edit the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
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...
0
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.