473,564 Members | 2,768 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"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 14085
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*********@ho tmail.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
3662
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 between form and datasheet view. I would like to start in data sheet. Is there an alternative to "acNormal" that will force a starts in datasheet...
1
6800
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.", vbInformation, "No Data Available..." Cancel = True
1
2395
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. Thanks, Richard H
0
7245
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 aborted: The request was canceled" after about 7 MB. For example, I might be uploading a 73MB file. After about 11% done the upload aborts. :shake:...
7
1888
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() while 1: min, sec = time.localtime() if sec==0 and minutes!=min: # first occur of sec==0 only!! polling 10x a second minutes=min
1
1690
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 problem is im using sessions variables in same file so i hav 3 php tags in same file.and im not been able to know on submit which tag it goes. can...
4
9649
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 Membership Head of Families", vbInformation Cancel = True
6
8531
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 ActionVar char(6); BEGIN IF UPDATING THEN
0
7583
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7642
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7950
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6255
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1200
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.