OpenForm Action Cancelled after ugrading to Vista

C

Crossh

I have an 2003 access database that works fine on Windows XP, but errors out
on the docmd.openform line of code (OpenForm action was cancelled) after
upgrading to Vista. Strangely enough, this is only a problem for one form, so
far. All the other forms that have the same code work fine. Basically, I have
the user select a record from a subform and then click on a button (which
rebuilds the query for another form, saves it, and then opens the form to
allow editing of the selected record). Thanks for your help.
 
A

AccessVandal via AccessMonster.com

1. Does the docmd.openform include an openarg?
2. And does it refers to a control on a form?
3. Or the openning form refers to a control with a value?

You'll most likely need to compile,compact and repair your database in
Windows Vista than redeploy. It should work, if it does not than, do a little
change in your code.
 
C

Crossh

1. Yes it includes OpenArgs
DoCmd.OpenForm "frmNameOfForm", , , , , , "Edit"
2. No, it does not refer to a control on a form. It's used in the logic of
the processing.
3. The opening form refers to me.OpenArgs which in this case is "Edit".

The strange thing is that I have an almost identical set of forms, using the
same logic, and they work fine. Re-compiling in Vista everytime would not
work, only one of my users has it (not me), and this database gets
re-distributed with changes almost daily.
I always compact & repair before distributing
 
A

AccessVandal via AccessMonster.com

I'm clueless about this error Vista, it is strange as it does not happen in
XP. What I did was to simply modify my code in XP or Vista than can my
application work. I'm not sure a about what's in the PC environment that
might cause this problem. As I'm only aware that some of the Windows XP or
Vista updates can cause issues. I'm sure the A2K3 version is updated to SP3?

It may not work in your case but you might want to give it a try. Here's what
I would suggest.

Dim strOpenArg as String

strOpenArg = "Edit"

DoCmd.OpenForm "frmNameOfForm", , , , , , strOpenArg

Where were cases where in Vista a control value was not readable thus,
causing errors.
1. Yes it includes OpenArgs
DoCmd.OpenForm "frmNameOfForm", , , , , , "Edit"
2. No, it does not refer to a control on a form. It's used in the logic of
the processing.
3. The opening form refers to me.OpenArgs which in this case is "Edit".

The strange thing is that I have an almost identical set of forms, using the
same logic, and they work fine. Re-compiling in Vista everytime would not
work, only one of my users has it (not me), and this database gets
re-distributed with changes almost daily.
I always compact & repair before distributing
1. Does the docmd.openform include an openarg?
2. And does it refers to a control on a form?
[quoted text clipped - 11 lines]
 
C

Crossh

I just discovered something using the Vista OS, when I go into any ODBC
linked (SQL 2005) table and try to filter any date (just by clicking on the
Filter By Selection button) I get the error message, "Microsoft Access has
stopped working" and it closes the db down. Apparently Vista cannot filter
the date, which happens to be in the query that opens the form.
 
A

AccessVandal via AccessMonster.com

That's what the problem in Vista.

The date problem is very consistant. In debuging, the date was correct but
Access VBA can't read the date and will throw an error. Nothing to do with
regional settings at all, settings are in US even that did not work.

The closes windows update on XP was KB956391.
 
C

Crossh

"AccessVandal via AccessMonster.com" wrote:
Yes, the problem is Vista. Is there no solution?
 
A

AccessVandal via AccessMonster.com

I can only suggest to recode, did it work? It appears that this is not a
common problem.

Do you have KB956391 update?
Yes, the problem is Vista. Is there no solution?
That's what the problem in Vista.
[quoted text clipped - 3 lines]
The closes windows update on XP was KB956391.
 
A

AccessVandal via AccessMonster.com

In addition, please check the user's Vista PC. Does the referances matches
the version on A2K3 with windows XP and A2K3 with Vista? I'm just guessing
that Vista OS might replace the referances with newer version. Example,
Microsoft Access 11.0 Object Library with Microsoft Access 12.0 Object
Library.

Mine's with the windows update, what I did was just to recompile and repair
with the windows updates than can the mdb work in the Vista with A2K7. There
was no code changes at all.
 
C

Crossh

All the references are the same. Vista did not make any changes to the
references. I already tried to re-compile and repair the database. Are you
saying that you were able to re-create the error, but after recompiling and
repairing the Access db, the date error went away?
 
A

AccessVandal via AccessMonster.com

Yes, but my problem is on A2K with A2K7 on Vista. Ok, here is the storey.

I had users complaining about error of opening form. All these are running on
A2K7 runtime with A2K format on Windows XP and one user with full A2K with
Windows XP. Only one user with A2K3 with Windows XP. External users running
on Vista with full A2K7.

As I am aware of the windows updated the security patches recently including
mine, I tested my end on the Front-end DB and the same error appeared.
(Running on XP with A2K.)

(note this problem on Vista only and in trusted location)
Before trying to fix the error, I tested my app on the form’s module where
the error came from. Sure enough, the error came from my two control’s source
bound to the Date() function. In debugging, the control’s value is correct
but for reasons VBA can’t read the value. Removing the Date function from the
source control solved the problem. But I need the default value, so recode to
display the default value on the form’s OnOpen Event. This problem is
persistent on Vista.

However, not in XP. With XP, what I did was just recompile the code and do a
compact and repair and I’m back in business. (with the windows security
updates)

A month later or less, the problem goes away mysteriously from Vista with
full A2K7, I’m not able to replicate this error anymore.(note: this test
environment on PC with Vista and A2K7 is without newer security updates)

Hope it helps you to narrow down the problem.

Crossh, is it possible for you to share the windows security updates
information? Can you list down these between Nov to Dec 2008?

PS. Thanks for posting back with the results. And the user on Vista, have any
administrator rights on the folder? (Hate to ask this one, but you can never
know.)
 
C

Crossh

FYI, I decompiled then compiled all Access 2003 databases and now everything
works fine on the Vista machines.
 
A

AccessVandal via AccessMonster.com

Good to hear form you. Nice of you posting back the results.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top