p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

access thread: I don't understand this error msg


Message #1 by naz_2401@h... on Mon, 10 Jun 2002 09:28:39
Hi

Can someone help me understand what I've done wrong that 
this msg appear? Actually I'm not sure whether this is an 
error msg or not but why don't u take a look..

"The OpenForm action was canceled.
    You used a method of the DoCmd object to carry out an action in
Visual Basic, but then click Cancel in the dialog box. For example, you 
used the close method to close a changed form, then clicked Cancel in the 
dialog box that asks if you want to save the changes you made to the form."

Below is the code for the button when clicked, the msg above appear:
--------------------------------------------------------------------
Private Sub SEARCHING_Click()
On Error GoTo Err_SEARCHING_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "SEARCHING"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_SEARCHING_Click:
    Exit Sub

Err_SEARCHING_Click:
    MsgBox Err.Description
    Resume Exit_SEARCHING_Click
    
End Sub
-------------------------------------------------------------------------
TQ in advance....
-------------------------------------------------------------------------
Message #2 by "David Chapman" <luckychap@b...> on Mon, 10 Jun 2002 19:57:53 +0930
This is one of the awkward errors that no one will be able to pinpoint. It
usually means there is is something preventing the form from displaying.

The first thing to try is openning the form from the DB window.
Then check the source data  - may be this form is not based on a table but
check that fact too. Many problems are caused when an existing form is
copied and modified to suit a new situation. The on open, on load events
should be your next check. You are looking for something that is preventing
your form from displaying.
Try creating a new form from scratch, ensure it can be opened using the same
code, then start adding the items until you find it falls over. At least you
will pin point the problem.

It would be realy great to be able to give you the exact answer, I guess I
will never be an Access Guru

David

-----Original Message-----
From: naz_2401@h... [mailto:naz_2401@h...]
Sent: Monday, June 10, 2002 9:29 AM
To: Access
Subject: [access] I don't understand this error msg


Hi

Can someone help me understand what I've done wrong that
this msg appear? Actually I'm not sure whether this is an
error msg or not but why don't u take a look..

"The OpenForm action was canceled.
    You used a method of the DoCmd object to carry out an action in
Visual Basic, but then click Cancel in the dialog box. For example, you
used the close method to close a changed form, then clicked Cancel in the
dialog box that asks if you want to save the changes you made to the form."

Below is the code for the button when clicked, the msg above appear:
--------------------------------------------------------------------
Private Sub SEARCHING_Click()
On Error GoTo Err_SEARCHING_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "SEARCHING"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_SEARCHING_Click:
    Exit Sub

Err_SEARCHING_Click:
    MsgBox Err.Description
    Resume Exit_SEARCHING_Click

End Sub
-------------------------------------------------------------------------
TQ in advance....
-------------------------------------------------------------------------


  Return to Index