473,698 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Yet Another "OpenForm Action Cancelled" Topic

Hi, I've been having problems getting my forms to work correctly. If
seen other threads addressing this issue, however, these are not
working for me. The short of my problem is this. I am trying to open a
new form and initialize it with a db query based on the info in the
current form. This wasn't a problem until I changed the table's
primary key to an Autonumber. tblLockCore.loc kId is the autonumber at
the source of the problem...

strQuery = "Workstatio nID = '" & Workstation.Tex t & "' AND
tblLockCore.loc kid = '" ....
[for loop that finds and appends *only one* value]
strQuery = strQuery & "'"
DoCmd.OpenForm "frmLockCor e", , , strQuery

With the code above, I get the 'openform action cancelled' error. Keep
in mind there is no "Cancel = True" statement related to this code, nor
is there even a cancel button.

If I replace
tblLockCore.loc kid = '...' with
tblLockCore.loc kid - '...', the wrong record is used to initialize the
new form. Coincidentally it is always the first record that would be
found if the second clause was removed.

tblLockCore.loc kid - ... (no quotes) *same as above*

tblLockCore.loc kid = ... (no quotes) *same as above*

I believe that I have addressed the issues that I have seen work for
other people but apparently this is not good enough for my program. Any
ideas? Thanks in advance!

ps. a couple of links i had reviously read....
http://groups-beta.google.com/group/...bf46cd29f992ce

http://groups-beta.google.com/group/...730c533bc5ce63

Nov 13 '05 #1
2 1813
A typical case of the magical computer pixies... I leave the computer
for 3 hours and come back. I try all of the combos listed above and now
tblLockCore.loc kid = ... (no quotes)

works. I know what you are thinking, "He wasnt thorough before and that
was his problem." Sadly, I was quite thorough trying each one several
times. But...

At least it works now.

Nov 13 '05 #2
Couple of suggestions, Jeff.

This type of intermittent issue could be caused by a Name AutoCorrect bug,
particularly as you indicate that it was triggered by a structural change.
Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
More info:
http://allenbrowne.com/bug-03.html

If that is not the issue, it could be that the code fails when strQuery is
malformed. For example, of Workstation was Null, strQuery would end up
something like this:
"Workstatio nID = AND tblLocCore.lock id = 3"
which is clearly not going to work.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<je********@aol .com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. .
Hi, I've been having problems getting my forms to work correctly. If
seen other threads addressing this issue, however, these are not
working for me. The short of my problem is this. I am trying to open a
new form and initialize it with a db query based on the info in the
current form. This wasn't a problem until I changed the table's
primary key to an Autonumber. tblLockCore.loc kId is the autonumber at
the source of the problem...

strQuery = "Workstatio nID = '" & Workstation.Tex t & "' AND
tblLockCore.loc kid = '" ....
[for loop that finds and appends *only one* value]
strQuery = strQuery & "'"
DoCmd.OpenForm "frmLockCor e", , , strQuery

With the code above, I get the 'openform action cancelled' error. Keep
in mind there is no "Cancel = True" statement related to this code, nor
is there even a cancel button.

If I replace
tblLockCore.loc kid = '...' with
tblLockCore.loc kid - '...', the wrong record is used to initialize the
new form. Coincidentally it is always the first record that would be
found if the second clause was removed.

tblLockCore.loc kid - ... (no quotes) *same as above*

tblLockCore.loc kid = ... (no quotes) *same as above*

I believe that I have addressed the issues that I have seen work for
other people but apparently this is not good enough for my program. Any
ideas? Thanks in advance!

ps. a couple of links i had reviously read....
http://groups-beta.google.com/group/...bf46cd29f992ce

http://groups-beta.google.com/group/...730c533bc5ce63

Nov 13 '05 #3

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

Similar topics

2
11435
by: Sylvie Stone | last post by:
Hi group - I have an html form for that uses username and password to login to a specific area of the website. The "area" the user wants to go to is based on a pull down menu. Becasue the user/password info is in differnet databases, how can I call different validation scripts based on this input ? THANK YOU! See below please. Somethinglike this:
3
4358
by: Zhidian Du | last post by:
I am using java to write to url, http://fatigo.bioinfo.cnio.es/ , but I found the form is : <form method="post" action="/" enctype="multipart/form-data" name="fatigo"> I have no idea why the action is not a URL, can you explain it why. Thanks.
2
1443
by: Don | last post by:
Can someone tell me what I'm doing wrong here. I can't believe I'm having this kind of problem. Think maybe I've been working on this for too long, and everything is starting to look the same. I'm trying to use JS on a client-side page to prefill "action" of a <form> tag. Here's what I'm using: document.forms.action.value = "http://..." Can someone please give me a hand with this.
1
1995
by: tnhoe | last post by:
Hi, <Form method='post' action="next.htm?btn="+"this.myform.myobj.value"> What is the correct syntax for above ? Regards Hoe
1
3671
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 view? Thanks for your time Ralph
1
6784
by: RC | last post by:
If I want to explicitly save the record before executing a Close action. Which of the following should I use? Or does it depend on whether it is based on a Form or something else? If Me.Dirty Then RunCommand acCmdSaveRecord End If DoCmd.Close or
0
2556
by: Joeyej | last post by:
Hi - I'm trying to move/use a web form (containing some javascript field checks) previously hosted on a Windows 2000 server. However, the FORM METHOD="post..." command in the form (shown below) now renders "Page not Found" when launched on the new Windows 2003 server (ws-server1). The form is designed to use the write.asp program to write to an Acccess database and is successful on any Windows 2000 server. This is frustrating because...
4
1898
by: sid | last post by:
Can someone tell me how to detect "Action Cancelled" page with out polling. I have a frame set and I want to make sure the other frame is displaying what it is supposed to without polling. For some reason the page does not file OnError or OnLoad events. Any help is appreciated. Thanks
0
9156
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9021
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8892
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8860
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7716
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4365
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3043
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2327
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.