A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

"The OpenForm action was canceled"



 
 
Thread Tools Display Modes
  #1  
Old April 3rd, 2005, 12:40 AM
John Phelan-Cummings via AccessMonster.com
external usenet poster
 
Posts: n/a
Default "The OpenForm action was canceled"

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), was
equal to the "autonumber" field that I was navigating from.

Also, on the child form I created code that equated certain other "text"
fields equal to fields on the parrent form in order to populate those
fields, i.e., first and last name.

Finally, the parent form is also a link child form to another parent
(again, not a subform). Yes, the first and last name fields is the
information, that appear in the second and third forms,and origionly
entered on the first and top form.

John

--
Message posted via http://www.accessmonster.com
  #2  
Old April 4th, 2005, 12:14 PM
Wayne Morgan
external usenet poster
 
Posts: n/a
Default

This is usually caused of the form you're opening can do a check then close
itself by canceling the open in its Open event. If this is the case, you
just need to trap the error using an error handler in the calling code.

--
Wayne Morgan
MS Access MVP


"John Phelan-Cummings via AccessMonster.com" wrote
in message news:ddd420d3cf4c4c0e85f616753ad87653@AccessMonste r.com...
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), was
equal to the "autonumber" field that I was navigating from.

Also, on the child form I created code that equated certain other "text"
fields equal to fields on the parrent form in order to populate those
fields, i.e., first and last name.

Finally, the parent form is also a link child form to another parent
(again, not a subform). Yes, the first and last name fields is the
information, that appear in the second and third forms,and origionly
entered on the first and top form.

John

--
Message posted via http://www.accessmonster.com



  #3  
Old June 20th, 2005, 02:08 PM
jwr
external usenet poster
 
Posts: n/a
Default

I have a similar problem. How do you "trap" this error? I am a novice.
"Wayne Morgan" wrote in message
...
This is usually caused of the form you're opening can do a check then

close
itself by canceling the open in its Open event. If this is the case, you
just need to trap the error using an error handler in the calling code.

--
Wayne Morgan
MS Access MVP


"John Phelan-Cummings via AccessMonster.com"

wrote
in message news:ddd420d3cf4c4c0e85f616753ad87653@AccessMonste r.com...
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), was
equal to the "autonumber" field that I was navigating from.

Also, on the child form I created code that equated certain other "text"
fields equal to fields on the parrent form in order to populate those
fields, i.e., first and last name.

Finally, the parent form is also a link child form to another parent
(again, not a subform). Yes, the first and last name fields is the
information, that appear in the second and third forms,and origionly
entered on the first and top form.

John

--
Message posted via http://www.accessmonster.com





  #4  
Old August 4th, 2005, 03:04 PM
Renee
external usenet poster
 
Posts: n/a
Default

Example of error trapping on the On Open event:

On Error GoTo Error_Handler

......

Error_Handler:
If Err.Number 0 Then 'there is an error
If Err.Number 2501 Then 'it is not from cancel of the open event
MsgBox Err.Description, vbOKOnly, "Error #" & Err.Number
End If
End If



"jwr" wrote:

I have a similar problem. How do you "trap" this error? I am a novice.
"Wayne Morgan" wrote in message
...
This is usually caused of the form you're opening can do a check then

close
itself by canceling the open in its Open event. If this is the case, you
just need to trap the error using an error handler in the calling code.

--
Wayne Morgan
MS Access MVP


"John Phelan-Cummings via AccessMonster.com"

wrote
in message news:ddd420d3cf4c4c0e85f616753ad87653@AccessMonste r.com...
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), was
equal to the "autonumber" field that I was navigating from.

Also, on the child form I created code that equated certain other "text"
fields equal to fields on the parrent form in order to populate those
fields, i.e., first and last name.

Finally, the parent form is also a link child form to another parent
(again, not a subform). Yes, the first and last name fields is the
information, that appear in the second and third forms,and origionly
entered on the first and top form.

John

--
Message posted via http://www.accessmonster.com






 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Office 2003 installation problem, log file attached.... Ryan Setup, Installing & Configuration 0 January 20th, 2005 06:57 PM
Cancel action if fields in form are empty [email protected] General Discussion 3 December 9th, 2004 03:59 AM
OpenForm Action Cancelled Jan Il Using Forms 10 November 29th, 2004 04:17 AM
The OpenReport action was canceled. Steven M. Britton Setting Up & Running Reports 3 July 8th, 2004 09:23 PM
OpenReport action was canceled ERROR DB Setting Up & Running Reports 1 July 8th, 2004 08:59 PM


All times are GMT +1. The time now is 04:52 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.