Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 10th, 2007, 01:55 PM
victoria.rego@gmail.com
Guest
 
Posts: n/a
Default 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_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

  #2  
Old July 10th, 2007, 04:05 PM
Allen Browne
Guest
 
Posts: n/a
Default 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
>
  #3  
Old July 13th, 2007, 04:55 PM
victoria.rego@gmail.com
Guest
 
Posts: n/a
Default 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.
>

  #4  
Old July 13th, 2007, 09:25 PM
CDMAPoster@FortuneJames.com
Guest
 
Posts: n/a
Default 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

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles