473,398 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

"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
*** Sent via Developersdex http://www.developersdex.com ***

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 13 '05 #1
2 14067
Are you sure there are related records? Sounds like your error handling is
generating that message. Try a simplified version of your form linkage.
The command button wizard will walk you through creating an Open Form event
code that restricts related records to a specific value. Typically these
forms would have different record sources; yours sound like they are
repeating data. Again, typically subforms and/or Dlookup controls are used
to display related info not in the form's record source.
-Ed

"John Phelan-Cummings" <jp*********@hotmail.com> wrote in message
news:42**********@127.0.0.1...

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
*** Sent via Developersdex http://www.developersdex.com ***

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+
Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption
=----

Nov 13 '05 #2
John Phelan-Cummings wrote:
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"


The form being opened is somehow being cancelled. You likely have code
in the on open event of the form which, for whatever condition, has
cancel = true. This will raise the error 2501 in the calling procedure,
that of the button.

Put error handling in your button code. At the beginning of the proc,
after dims, write:

On Error GoTo Err_Proc

Then, at the bottom of your procedure write something like the following:

Exit_Proc:

Exit Function

Err_Proc:

Select Case Err.Number

Case 2501 'form opening cancelled, bypass error message and end
procedure

GoTo Exit_Proc

Case Else

MsgBox "Error " & Err.Number & " " & Err.Description,
vbCritical, "Name of Button/Command Procedure", Err.HelpFile,
Err.HelpContext

GoTo Exit_Proc

End Select
End Function

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: unknown | last post by:
Can some one give me some "air code" to open a form in datasheet read only view. This... DoCmd.OpenForm "anyform", acNormal, acReadOnly ....will open my form and I can toggle back and forth...
1
by: LittleCheeseburger | last post by:
Hi, For my 'On No Data' event I have the following code: Private Sub Report_NoData(Cancel As Integer) On Error Resume Next MsgBox "There is no data available for your selections.",...
1
by: Richard Holliingsworth | last post by:
Hello: The group has new 'standards' for online forms and I need to change the 'style' of my existing forms (A2002). Can I do this? I can't find a way using the GUI or the properties. ...
0
by: Alex | last post by:
my app was working fine in VB.NET 2003 (and framework 1.1). Now with VB.NET 2005 (framework 2.0) the uploading to an http server (ie. www.sharebigfile.com) stops with the error "The request was...
7
by: Petr Jakes | last post by:
I would like to do "some action" once a minute. My code (below) works, I just wonder if there is some more pythonic approach or some "trick" how to do it differently. minutes=time.localtime()...
1
by: swatidesai0407 | last post by:
hi im swati, working in php with mysql im working on a form wherin it adds record to database and on submit it should go to same php file dats y i want to use form action="PHP_SELF" but my...
4
by: Phil Stanton | last post by:
I am opening a report (in Preview) from a menu system I use the following code if there is no data in a report Private Sub Report_NoData(Cancel As Integer) MsgBox "There are no errors in...
6
by: viny2cool | last post by:
Hey guys I am trying to create an trigger, but getting this error. My code is as follows CREATE OR REPLACE TRIGGER vendorpricingTR BEFORE UPDATE OF pricing ON vendors FOR EACH ROW DECLARE ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.