Solved

ACCESS.   openform action cancelled

Posted on 2004-07-30
1
586 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 32

Accepted Solution

by:
jadedata earned 125 total points
ID: 11681439
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

729 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