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