Connecting Tech Pros Worldwide Help | Site Map

The OpenForm action was cancelled - for only 1 user?

victoria.rego@gmail.com
Guest
 
Posts: n/a
#1: Jul 10 '07
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_contacts", acNormal
End Sub

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

Private Sub cmdCSV_Click()
DoCmd.TransferText 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.OpenReport "rptELRP3", acViewPreview
On Error Resume Next
DoCmd.RunCommand acCmdPrint
End Sub

Private Sub Command6_Click()
DoCmd.TransferText acExportDelim, , "03_ELRP_05", "C:\Contacts.csv",
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_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

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

Allen Browne
Guest
 
Posts: n/a
#2: Jul 10 '07

re: The OpenForm action was cancelled - for only 1 user?


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\system32), 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.txt"
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.txt"

--
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.

<victoria.rego@gmail.comwrote in message
news:1184071990.141809.282220@r34g2000hsd.googlegr oups.com...
Quote:
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_contacts", acNormal
End Sub
>
===============================================
FRM_CONTACTS
===============================================
Option Compare Database
>
Private Sub cmdCSV_Click()
DoCmd.TransferText 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.OpenReport "rptELRP3", acViewPreview
On Error Resume Next
DoCmd.RunCommand acCmdPrint
End Sub
>
Private Sub Command6_Click()
DoCmd.TransferText acExportDelim, , "03_ELRP_05", "C:\Contacts.csv",
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_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
>
Set rs = Me.Recordset.Clone
rs.FindFirst "[Facility Name] = '" & Me![Combo30] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
>
victoria.rego@gmail.com
Guest
 
Posts: n/a
#3: Jul 13 '07

re: The OpenForm action was cancelled - for only 1 user?


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...@SeeSig.Invalid>
wrote:
Quote:
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\system32), 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.txt"
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.txt"
>
--
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.
>

CDMAPoster@FortuneJames.com
Guest
 
Posts: n/a
#4: Jul 13 '07

re: The OpenForm action was cancelled - for only 1 user?


On Jul 13, 11:47 am, victoria.r...@gmail.com wrote:
Quote:
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
CDMAPoster@FortuneJames.com

Closed Thread