473,788 Members | 2,811 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The OpenForm action was cancelled - for only 1 user?

Hi there,

My application is generating a "The OpenForm action was cancelled"
error and I can't seem to figure out why. The best part about it is
that it's only one user in the entire building - it works perfectly
fine for the rest of us. So troubleshooting is extremely difficult.

Here is the code involved. The command button that opens the form,
the code in the form, and the code in the subform of the form.

Any help would be greatly appreciated!
=============== =============== =============== ==
COMMAND BUTTON THAT OPENS THE NEW FORM
=============== =============== =============== ==
Private Sub cmdELRPContact_ Click()
DoCmd.OpenForm "frm_contac ts", acNormal
End Sub

=============== =============== =============== ==
FRM_CONTACTS
=============== =============== =============== ==
Option Compare Database

Private Sub cmdCSV_Click()
DoCmd.TransferT ext acExportDelim, "speNtfcnEmail" , "03_ELRP_05 ", "C:\"
& "temp.csv", False
Shell "Excel C:\temp.csv", vbNormalFocus
End Sub

Private Sub cmdExport_Click ()
DoCmd.OutputTo acOutputQuery, "03_ELRP_04 ", acFormatXLS, "C:
\Contacts.xls", True
End Sub

Private Sub cmdPrintReport_ Click()
DoCmd.OpenRepor t "rptELRP3", acViewPreview
On Error Resume Next
DoCmd.RunComman d acCmdPrint
End Sub

Private Sub Command6_Click( )
DoCmd.TransferT ext acExportDelim, , "03_ELRP_05 ", "C:\Contacts.cs v",
False
Shell "Excel C:\Contacts.csv ", vbNormalFocus
On Error Resume Next
End Sub

=============== =============== =============== ==
SUBFRM_CONTACTS
A subform of frm_contacts
=============== =============== =============== ==
Option Compare Database

Private Sub Combo30_AfterUp date()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Cl one
rs.FindFirst "[Facility Name] = '" & Me![Combo30] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Jul 10 '07 #1
3 7492
As you say, this could be from quite a range of causes. Suggestions:

1. First thing would be to examine the library references. Anything marked
as MISSING on this machine? More info on references:
http://allenbrowne.com/ser-38.html

2. If you have several users in this database at once, is it split so that
everyone has a completely separate copy of the front end? More info on
splitting:
http://allenbrowne.com/ser-01.html

3. Is the database secured (Access security) or on a network or using tables
from a network where the user's Windows Permissions might prevent them from
using this form or its table(s) or the tables needed by any
subform/combo/list box/lookup?

4. Make sure that the Name AutoCorrect boxes are unchecked under:
Tools | Options | General
Explanation of why:
http://allenbrowne.com/bug-03.html

5. Run a Compact/Repair:
Tools | Database Utilities | Compact/Repair

6. Add this line to the top of each module:
Option Explicit
Then choose Compile on the Debug menu.
Fix any errors, and continue until it compiles without error.

If the problem still exists, you are now looking to identify what is
different about the machine where it fails compared to the other machines.

7. Choose About on the Help menu. What version? And what SP (service pack)?
You can also right-click the msaccess.exe file (typically in C:\Program
Files\Microsoft Office\Office), and choose Properties, then get the version
number from the Version tab. This link shows the version number you should
see for each version of Access, and the most recent service pack:
http://allenbrowne.com/ser-53.html#MSAccess

8. Locate the file msjet40.dll (typically in windows\system3 2), choose
Properties, and look on the Version tab. It will be 4.0.xxxx. The first "x"
should be an 8 or 9 (depending on your version of Windows.) If it is less
than 8, you need to apply the latest JET service pack.

The Office and JET service packs are available from:
http://support.microsoft.com/sp/

9. If none of that is fruitful, the form may be corrupt.
Back up your database (while it's not open.)
Open the Immediate Window (Ctrl+G)
Enter a command like this:
SaveAsText acForm, "Form1", "C:\Form1.t xt"
using your form name instead of Form1.
Then delete the form from your database.
Then compact the database.
Then get Access to create the form again with:
LoadFromText acForm, "Form1", "C:\Form1.t xt"

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<vi***********@ gmail.comwrote in message
news:11******** **************@ r34g2000hsd.goo glegroups.com.. .
Hi there,

My application is generating a "The OpenForm action was cancelled"
error and I can't seem to figure out why. The best part about it is
that it's only one user in the entire building - it works perfectly
fine for the rest of us. So troubleshooting is extremely difficult.

Here is the code involved. The command button that opens the form,
the code in the form, and the code in the subform of the form.

Any help would be greatly appreciated!
=============== =============== =============== ==
COMMAND BUTTON THAT OPENS THE NEW FORM
=============== =============== =============== ==
Private Sub cmdELRPContact_ Click()
DoCmd.OpenForm "frm_contac ts", acNormal
End Sub

=============== =============== =============== ==
FRM_CONTACTS
=============== =============== =============== ==
Option Compare Database

Private Sub cmdCSV_Click()
DoCmd.TransferT ext acExportDelim, "speNtfcnEmail" , "03_ELRP_05 ", "C:\"
& "temp.csv", False
Shell "Excel C:\temp.csv", vbNormalFocus
End Sub

Private Sub cmdExport_Click ()
DoCmd.OutputTo acOutputQuery, "03_ELRP_04 ", acFormatXLS, "C:
\Contacts.xls", True
End Sub

Private Sub cmdPrintReport_ Click()
DoCmd.OpenRepor t "rptELRP3", acViewPreview
On Error Resume Next
DoCmd.RunComman d acCmdPrint
End Sub

Private Sub Command6_Click( )
DoCmd.TransferT ext acExportDelim, , "03_ELRP_05 ", "C:\Contacts.cs v",
False
Shell "Excel C:\Contacts.csv ", vbNormalFocus
On Error Resume Next
End Sub

=============== =============== =============== ==
SUBFRM_CONTACTS
A subform of frm_contacts
=============== =============== =============== ==
Option Compare Database

Private Sub Combo30_AfterUp date()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Cl one
rs.FindFirst "[Facility Name] = '" & Me![Combo30] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Jul 10 '07 #2
Thanks very much for your help.
Some of your suggestions and resources were very educational and I
enjoyed looking into them.

However, I'm sad to say I checked / did each of these suggestions
carefully and, between the application itself and the computer in
question, I passed through all of them and still the problems
persists.

Short of reformatting the computer, I am completely drained of ideas
and it is extremely upsetting.
If anyone has any other suggestions, I would love to hear them. I'll
try just about anything (except reformat the computer)
On Jul 10, 10:59 am, "Allen Browne" <AllenBro...@Se eSig.Invalid>
wrote:
As you say, this could be from quite a range of causes. Suggestions:

1. First thing would be to examine the library references. Anything marked
as MISSING on this machine? More info on references:
http://allenbrowne.com/ser-38.html

2. If you have several users in this database at once, is it split so that
everyone has a completely separate copy of the front end? More info on
splitting:
http://allenbrowne.com/ser-01.html

3. Is the database secured (Access security) or on a network or using tables
from a network where the user's Windows Permissions might prevent them from
using this form or its table(s) or the tables needed by any
subform/combo/list box/lookup?

4. Make sure that the Name AutoCorrect boxes are unchecked under:
Tools | Options | General
Explanation of why:
http://allenbrowne.com/bug-03.html

5. Run a Compact/Repair:
Tools | Database Utilities | Compact/Repair

6. Add this line to the top of each module:
Option Explicit
Then choose Compile on the Debug menu.
Fix any errors, and continue until it compiles without error.

If the problem still exists, you are now looking to identify what is
different about the machine where it fails compared to the other machines.

7. Choose About on the Help menu. What version? And what SP (service pack)?
You can also right-click the msaccess.exe file (typically in C:\Program
Files\Microsoft Office\Office), and choose Properties, then get the version
number from the Version tab. This link shows the version number you should
see for each version of Access, and the most recent service pack:
http://allenbrowne.com/ser-53.html#MSAccess

8. Locate the file msjet40.dll (typically in windows\system3 2), choose
Properties, and look on the Version tab. It will be 4.0.xxxx. The first "x"
should be an 8 or 9 (depending on your version of Windows.) If it is less
than 8, you need to apply the latest JET service pack.

The Office and JET service packs are available from:
http://support.microsoft.com/sp/

9. If none of that is fruitful, the form may be corrupt.
Back up your database (while it's not open.)
Open the Immediate Window (Ctrl+G)
Enter a command like this:
SaveAsText acForm, "Form1", "C:\Form1.t xt"
using your form name instead of Form1.
Then delete the form from your database.
Then compact the database.
Then get Access to create the form again with:
LoadFromText acForm, "Form1", "C:\Form1.t xt"

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

Jul 13 '07 #3
On Jul 13, 11:47 am, victoria.r...@g mail.com wrote:
Thanks very much for your help.
Some of your suggestions and resources were very educational and I
enjoyed looking into them.

However, I'm sad to say I checked / did each of these suggestions
carefully and, between the application itself and the computer in
question, I passed through all of them and still the problems
persists.

Short of reformatting the computer, I am completely drained of ideas
and it is extremely upsetting.
If anyone has any other suggestions, I would love to hear them. I'll
try just about anything (except reformat the computer)
In:

http://groups.google.com/group/comp....5cd3c3b6ad010d

I said

Starting the subform visible property false seems to keep its Current
event from running immediately after the form opens.

It's a shot in the dark, but maybe your subform requires that
something is available on frm_contacts and that the main form loading
takes different times for different computers. Sometimes Access'
attempts to optimize code, especially with things like Recordsets,
lead to time dependencies. As a first step, try running it without
the subform on the problem machine. If it turns out that the subform
loading is causing the problem, the subform visible technique can
delay loading until after the main form is populated.

James A. Fortune
CD********@Fort uneJames.com

Jul 13 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
6878
by: Stuart Clark | last post by:
Hi, I have the following lines of code: stLinkCriteria = " BETWEEN " & & " AND " & DoCmd.OpenForm stDocName, , , stLinkCriteria Every time I try and run this I get the following error: Run-Time Error 2501 The OpenForm action was cancelled.
3
6215
by: Prakash Wadhwani | last post by:
In an openform event if I type cancel=true a msgbox pops up saying: "The OpenForm Acion was cancelled" This is iritating. Is there any way to turn of this message via VBA? Thx & Best Rgds, Prakash.
0
1420
by: Steve Hall | last post by:
Folks, I have an Access front end to a SQL Server 2k back end. The database consists of 5 main "record types" (many more tables than this however) - Test Logs (TLs), 2 Test Executions (TEs), 3 Test Reports (TRs), 4 Observation Reports (ORs), and 5 Change Reports (CRs). All TEs have a parent TL.
2
14111
by: John Phelan-Cummings | last post by:
After creating a button on a (parent) form linking to another (child) form, I received the following error when clicking on the command button: "The OpenForm action was canceled" No the child form is not a subform. I should also add that I created code in the properties window stating that the "child" "number" field on the form (that I was navigating to),
2
1819
by: jeffrod444 | last post by:
Hi, I've been having problems getting my forms to work correctly. If seen other threads addressing this issue, however, these are not working for me. The short of my problem is this. I am trying to open a new form and initialize it with a db query based on the info in the current form. This wasn't a problem until I changed the table's primary key to an Autonumber. tblLockCore.lockId is the autonumber at the source of the problem... ...
4
20880
by: SDL | last post by:
Help! I have a system that was running fine and I was testing a bottom level form. I went from a menu to a screen where I could enter a phone number or name to find a customer. If the customer name hit on more than one person ther is an interim selection screen. I have been running thru these screens for 2 days now and everything was fine and suddenly I get "The OpenForm actionwas cancelled." Run Time err 2501? This is happening on...
3
2260
by: e name | last post by:
Hello, I am getting "Action Cancelled" message on an asp page which is running a process that takes more then 25 minutes. I have "Friendly error message" turned off on browser setting. And what happens is this process processes a huge xml file size of 4mb which is passed to the com object located on Application Server as xmlElement from asp page on Webserver. The process finishes successfully after 29 min but try to re run by itself
2
12876
by: mark mestrom | last post by:
hi, i have this problem with OpenForm and the stLinkCriteria. I have the following code: Private Sub Knop22_Click() On Error GoTo Err_Knop22_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "ALAHistorieEdit"
3
2922
by: ladybug76 | last post by:
Hello Again. I'm so close I can TASTE IT! I'm working in Access 2003. I've read a bunch of posts, but still can't get to the bottom of this. I have a "Selection Criteria" form (with Two free form Text Boxes Named Line_Num and Claim_Num). Based on the entry in both fields, the users want to click on a button that launches and filters the returned results of the "Main form" by the Line and Claim numbers from the Selection Form. ...
0
9498
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10370
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10177
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8995
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5538
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4074
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2896
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.