Solved

ACCESS.   openform action cancelled

Posted on 2004-07-30
1
537 Views
Last Modified: 2008-02-01
I am getting an runtime error upon executing this code:
runtime error '2501'  The openform action was canceled.
This code worked initially so I am unsure what to think now.
Here is the code:
stLinkCriteria = "[productID]= '" & Me![Text27] & "' And [draft] = " & Me![draft]
stDocName = "frmwhy?"
DoCmd.OpenForm stDocName, , , stLinkCriteria
stDocName2 = "updatebuildrequest2"
DoCmd.OpenQuery stDocName2, acNormal, acEdit
DoCmd.Close acForm, "frmbuildrequestqueue"

The debugger mode shows the linkcriteria executed correctly.
0
Comment
Question by:dpalyca
1 Comment
 
LVL 32

Accepted Solution

by:
jadedata earned 125 total points
Comment Utility
the error is coming from the form you are trying to open with this code, NOT in this code itself.  Probably a flaw in the forms OnOpen logic or in a data error caused at open.

-j-
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now