invalid reference to the property Form/Report. 2455

M

M Skabialka

The following expression has worked fine for two years in Access 2000

Forms!frmevaluation!frmCube1.Controls(Forms!frmevaluation!OldRiskFactor) =
""
The value of Forms!frmevaluation!OldRiskFactor is similar to "C3P2" which is
a field name on frmCube1 which shows a 5x5 cube with 25 fields.

Now it suddenly gives me this error:

You entered an expression that has an invalid reference to the property
Form/Report. 2455

The form hasn't changed in months, I haven't changed any references or
upgraded Office 2000, or done any patches recently, only Windows 2000
security patches which shouldn't have any bearing on this. Microsoft's site
suggests it is a "dirty" property problem, but I don't think it is; it has
worked forever. The help files don't help either.

Help please, what is going on here???
Mich
 
B

Bruce M. Thompson

The following expression has worked fine for two years in Access 2000
Forms!frmevaluation!frmCube1.Controls(Forms!frmevaluation!OldRiskFactor) =
""

I can't image that working in any version of Access.
The value of Forms!frmevaluation!OldRiskFactor is similar to "C3P2" which is
a field name on frmCube1 which shows a 5x5 cube with 25 fields.

How can a field contain "25 fields"? Are you sure that it isn't a subform?
Now it suddenly gives me this error:

You entered an expression that has an invalid reference to the property
Form/Report. 2455

The form hasn't changed in months,

Has the form been used regularly during this time?
I haven't changed any references or
upgraded Office 2000, or done any patches recently, only Windows 2000
security patches which shouldn't have any bearing on this. Microsoft's site
suggests it is a "dirty" property problem, but I don't think it is; it has
worked forever. The help files don't help either.

I won't argue about the help files being less than functional, but I can't see
how your code worked in the first place. I have seen corruption in the VBA
appear to "rewrite" my code in such a way that it didn't make sense, just as
your line of code doesn't seem to make sense. There is a "decompile" switch
(available in Access 97, 2000, 2002 and, presumably, 2003) that can be used to
help correct this situation, but this is more of a "last resort" in that there
is some risk to the file as described in
http://www.trigeminal.com/usenet/usenet004.asp?1033 (so ... work with a copy of
the file). Further information is available at
http://www.databasecreations.com/DatabasePerformanceTips.pdf. The procedure I
use when implementing this is as follows:

1) BACK UP YOUR MDB FILE!
1) BACK UP YOUR MDB FILE! (I meant it the first time <g>)
2) Compact the MDB.
3) Implement the "/decompile" as described in the articles I referenced.
(Access 2000, and later, don't provide the confirmation dialog that
existed in Access 97, but the decompile will still take place.)
4) Open Access normally and compact the MDB again to clean up.
5) Compile and save.
6) Compact again before testing/using.

Hopefully, this will clear things up for you. If not, I am at a loss to explain
what has happened.
 
M

M Skabialka

All of the following lines and many and others like them have worked on a
daily basis:

Me.Controls(RiskFactor) = "X"
Me.Controls("C" & C & "P" & P) = Null

Forms!frmLevelAssessment.Controls("C1P" & Trim(Str(RiskProbability))) = Null
Forms!frmLevelAssessment.Controls([RiskFactor]) = Null

Forms!frmLevelAssessment.Controls("C" & Trim(Str([RiskConsequence])) & "P" &
Trim(Str(RiskProbability))) = "X"
Forms!frmevaluation!frmCube1.Controls(Me!RiskFactor) = ""

Forms!frmevaluation!frmCube1.Controls(Forms!frmevaluation!OldRiskFactor) =
""
Forms!frmevaluation!frmCube1.Controls(Me!RiskFactor) = "X"


RiskConsequence and RiskProbability are selected from options and result in
values from 1 to 5, so you select a probability of 2 and a consequence of 3
and it uses
"C" & Trim(Str([RiskConsequence])) & "P" & Trim(Str(RiskProbability))) to
create "C3P2" as a value which happens to also be a field name on subform
frmCube1.

Forms!frmevaluation!frmCube1.Controls(Forms!frmevaluation!OldRiskFactor) =
"" ' where Forms!frmevaluation!OldRiskFactor = "C1P1" e.g.
blanks out the old "X"

Forms!frmevaluation!frmCube1.Controls(Me!RiskFactor) = "X" 'where
Me!RiskFactor = "C3P2"
fills in the new "X", which results in the cube looking something this,
where all other values are null.

| | | | | |
| | | | | |
| | | | | |
| | |X| | |
| | | | | |

I have saved, compacted, decompiled, recompiled, recompacted and it still
gives me the same error, even with an older version.
So far the production users have not seen this problem, so something has
happened to my copy of Access 2000 or ?????

Help again please,
Thanks,
Mich
 
B

Bruce M. Thompson

I have saved, compacted, decompiled, recompiled, recompacted and it still
gives me the same error, even with an older version.
So far the production users have not seen this problem, so something has
happened to my copy of Access 2000 or ?????

Hmmm. Try copying the application from one of the user's machines and running it
on your machine to see if the problem still occurs. If it does, it is likely
machine-specific and I would suspect a possible "reference" issue or damaged
Access or shared file. To address a possible "reference" problem, see the
following page at Doug Steele's web site (I would try this anyway, just to be on
the safe side):

http://members.rogers.com/douglas.j.steele/AccessReferenceErrors.html

If this doesn't produce a solution for you, let me know and I'll see if I (or
the "cavalry") can come up with any other solutions that would not require the
re-installation of Access or <ackkk> Windows.
 
M

M Skabialka

I totally removed Office 2000 from the PC, then reinstalled it, followed by
SP1 and SR3 (or whatever they are called.)

I ran the System File Checker which found no problems.

I then looked at a year old backup of the database to see if my current
references had changed. They hadn't.
I've tried a copy of the dB from another PC, an old version (which had no
problems) and the newest one. But I am still getting the same error:

You entered an expression that has an invalid reference to the property
Form/Report. 2455

The only thing I did recently was to do some Windows Updates last week just
prior to this happening.

I am hoping I don't have to reinstall Windows. This was a Win98SE PC,
formatted and started over with Win2K Pro 6 months ago. I am told you
cannot reinstall Windows over itself; and the one time I tried it I had to
borrow ERD Commander to fix the PC because it became totally fried, not
bootable even!

Does Win 2000 Pro have a system restore - I couldn't find it, just the "last
known good configuration" but I've tried a lot of things in the last few
days, hard to tell what this "last known good" one would consist of....
Should I uninstall those Windows Updates done last week - how is this done?

I don't have the luxury of being able to get another PC - any more ideas
please?
Thanks,
Mich
 
B

Bruce M. Thompson

Comments interspersed.
I totally removed Office 2000 from the PC, then reinstalled it, followed by
SP1 and SR3 (or whatever they are called.)

I ran the System File Checker which found no problems.

I then looked at a year old backup of the database to see if my current
references had changed. They hadn't.
I've tried a copy of the dB from another PC, an old version (which had no
problems) and the newest one. But I am still getting the same error:

You entered an expression that has an invalid reference to the property
Form/Report. 2455

I can find no reference to that error number in any place other than the
following MS Knowledge Base article (the message differs from that which you
have provided, however):

http://support.microsoft.com/default.aspx?kbid=208908

Is this the web site you referred to? Are you *sure* you are not referencing an
unbound form's "Dirty" property?
The only thing I did recently was to do some Windows Updates last week just
prior to this happening.

I am hoping I don't have to reinstall Windows. This was a Win98SE PC,
formatted and started over with Win2K Pro 6 months ago. I am told you
cannot reinstall Windows over itself; and the one time I tried it I had to
borrow ERD Commander to fix the PC because it became totally fried, not
bootable even!

Does Win 2000 Pro have a system restore - I couldn't find it, just the "last
known good configuration" but I've tried a lot of things in the last few
days, hard to tell what this "last known good" one would consist of....
Should I uninstall those Windows Updates done last week - how is this done?

No system restore in Win2K (this first appeared in Windows ME, I believe, and
exists now in Windows XP). I still see your coding as unorthodox and, again,
"hard to believe it will even run". I can only rely on your claim that this code
ran and gave you the results you were looking for, but I still think it is your
code that is the problem. I guess that I have no answers for you other than
possibly restoring your system to the prior state where it was working properly
(Win98SE?).
 
M

M Skabialka

Maybe you can help me re-write the code?

I have a risk cube subform which has a grid cube showing 5x5 or 25 fields.
Based on user selections, the x and y coordinates for the cube are selected.
RiskConsequence is a value from 1 to 5, as is RiskProbability.

To find out which of the 25 fields to mark with an X, I use this code to
find the field name:

C" & Trim(Str([RiskConsequence])) & "P" & Trim(Str(RiskProbability)
e.g. if the RiskConsequence selected was 3 and the RiskProbability was 2
this reults in "C3P2"

Using this information, "C3P2", I want to change the field of that same name
on frmCube1 to the value "X". At the same time I change the previously
selected field (default is "C1P1") to "" or null, so only one X shows up on
the 5x5 grid.
These fields appear on the current form which is a popup, plus they also
appears on the previously opened form, where I also want to update it, so
when the popup closes the other form shows the most current values.

How can I refer to the field name, if I know the string value, "C3P2"; ie.
how can I refer to that as a field?

This is why I was using the following code:
Forms!frmLevelAssessment.Controls("C" & Trim(Str([RiskConsequence])) & "P" &
Trim(Str(RiskProbability))) = "X"
to refer to the field:
Forms!frmLevelAssessment!C3P2

If there is a better way to refer to the field name that will stop giving me
these errors I would be deliriously happy!

Thanks again,
Michele
 
B

Bruce M. Thompson

Maybe you can help me re-write the code?

Let's see what we can do.
I have a risk cube subform which has a grid cube showing 5x5 or 25 fields.
Based on user selections, the x and y coordinates for the cube are selected.
RiskConsequence is a value from 1 to 5, as is RiskProbability.

To find out which of the 25 fields to mark with an X, I use this code to
find the field name:

C" & Trim(Str([RiskConsequence])) & "P" & Trim(Str(RiskProbability)
e.g. if the RiskConsequence selected was 3 and the RiskProbability was 2
this reults in "C3P2"

Using this information, "C3P2", I want to change the field of that same name
on frmCube1 to the value "X". At the same time I change the previously
selected field (default is "C1P1") to "" or null, so only one X shows up on
the 5x5 grid.
These fields appear on the current form which is a popup, plus they also
appears on the previously opened form, where I also want to update it, so
when the popup closes the other form shows the most current values.

How can I refer to the field name, if I know the string value, "C3P2"; ie.
how can I refer to that as a field?

So far, it appears that you are okay with your code.
This is why I was using the following code:
Forms!frmLevelAssessment.Controls("C" & Trim(Str([RiskConsequence])) & "P" &
Trim(Str(RiskProbability))) = "X"
to refer to the field:
Forms!frmLevelAssessment!C3P2

I see no problem with that, either.
If there is a better way to refer to the field name that will stop giving me
these errors I would be deliriously happy!

Here is the code that I thought might be giving you problems:

'***
Forms!frmevaluation!frmCube1.Controls(Forms!frmevaluation!OldRiskFactor)=""
Forms!frmevaluation!frmCube1.Controls(Me!RiskFactor)="X"
'***

But, now that I better understand what you are doing, it appears that *this*
code would work okay. Are you *sure* that you have no code in an "AfterUpdate"
or similar event that makes reference to the "Dirty" property of a form? While
the "frmevaluation" module is open in the code window, select, from the menu,
"Edit, Find" and enter "dirty" in the "Find What" box and set the "Search" to
"Current Module". If it locates the "Dirty" property and that property is
appurtenant to "Me" or "frmevaluation", then you have likely located your
problem.
 
M

M Skabialka

There are no references in the entire database to the Dirty property.

I have now gone back and restored copies of the database FE and BE for every
month back through March. In every case I am getting this same error, on
two machines now. The other PC was a retired one that hasn't been turned on
since June, so no Windows updates or office updates have been applied since
then.

This database is still functioning on other PCs for people out of the state.
They are not getting errors, yet the code has not changed. They are using
the version I released mid September, which gives me the error on both PCs.

How can code go haywire after it has been functioning for months?

At this point I can't do any database development - HELP!
Mich

Bruce M. Thompson said:
Maybe you can help me re-write the code?

Let's see what we can do.
I have a risk cube subform which has a grid cube showing 5x5 or 25 fields.
Based on user selections, the x and y coordinates for the cube are selected.
RiskConsequence is a value from 1 to 5, as is RiskProbability.

To find out which of the 25 fields to mark with an X, I use this code to
find the field name:

C" & Trim(Str([RiskConsequence])) & "P" & Trim(Str(RiskProbability)
e.g. if the RiskConsequence selected was 3 and the RiskProbability was 2
this reults in "C3P2"

Using this information, "C3P2", I want to change the field of that same name
on frmCube1 to the value "X". At the same time I change the previously
selected field (default is "C1P1") to "" or null, so only one X shows up on
the 5x5 grid.
These fields appear on the current form which is a popup, plus they also
appears on the previously opened form, where I also want to update it, so
when the popup closes the other form shows the most current values.

How can I refer to the field name, if I know the string value, "C3P2"; ie.
how can I refer to that as a field?

So far, it appears that you are okay with your code.
This is why I was using the following code:
Forms!frmLevelAssessment.Controls("C" & Trim(Str([RiskConsequence])) & "P" &
Trim(Str(RiskProbability))) = "X"
to refer to the field:
Forms!frmLevelAssessment!C3P2

I see no problem with that, either.
If there is a better way to refer to the field name that will stop giving me
these errors I would be deliriously happy!

Here is the code that I thought might be giving you problems:

'***
Forms!frmevaluation!frmCube1.Controls(Forms!frmevaluation!OldRiskFactor)=""
Forms!frmevaluation!frmCube1.Controls(Me!RiskFactor)="X"
'***

But, now that I better understand what you are doing, it appears that *this*
code would work okay. Are you *sure* that you have no code in an "AfterUpdate"
or similar event that makes reference to the "Dirty" property of a form? While
the "frmevaluation" module is open in the code window, select, from the menu,
"Edit, Find" and enter "dirty" in the "Find What" box and set the "Search" to
"Current Module". If it locates the "Dirty" property and that property is
appurtenant to "Me" or "frmevaluation", then you have likely located your
problem.
 
M

M Skabialka

I have found an old copy of the dB which will work on the old machine and
not the newer one. It is the exact same copy, running independently on two
machines. Same FE, same BE.

One PC gives the error whenever I use this syntax:
Forms!frmevaluation!frmCube1!C2P3
or
Forms!frmevaluation!frmCube1.Controls("C2P3")

The other doesn't on this earlier version from months ago. Both have the
error on the newest version.

I have tried decompiling, recompiling, etc...

Mich

Bruce M. Thompson said:
Maybe you can help me re-write the code?

Let's see what we can do.
I have a risk cube subform which has a grid cube showing 5x5 or 25 fields.
Based on user selections, the x and y coordinates for the cube are selected.
RiskConsequence is a value from 1 to 5, as is RiskProbability.

To find out which of the 25 fields to mark with an X, I use this code to
find the field name:

C" & Trim(Str([RiskConsequence])) & "P" & Trim(Str(RiskProbability)
e.g. if the RiskConsequence selected was 3 and the RiskProbability was 2
this reults in "C3P2"

Using this information, "C3P2", I want to change the field of that same name
on frmCube1 to the value "X". At the same time I change the previously
selected field (default is "C1P1") to "" or null, so only one X shows up on
the 5x5 grid.
These fields appear on the current form which is a popup, plus they also
appears on the previously opened form, where I also want to update it, so
when the popup closes the other form shows the most current values.

How can I refer to the field name, if I know the string value, "C3P2"; ie.
how can I refer to that as a field?

So far, it appears that you are okay with your code.
This is why I was using the following code:
Forms!frmLevelAssessment.Controls("C" & Trim(Str([RiskConsequence])) & "P" &
Trim(Str(RiskProbability))) = "X"
to refer to the field:
Forms!frmLevelAssessment!C3P2

I see no problem with that, either.
If there is a better way to refer to the field name that will stop giving me
these errors I would be deliriously happy!

Here is the code that I thought might be giving you problems:

'***
Forms!frmevaluation!frmCube1.Controls(Forms!frmevaluation!OldRiskFactor)=""
Forms!frmevaluation!frmCube1.Controls(Me!RiskFactor)="X"
'***

But, now that I better understand what you are doing, it appears that *this*
code would work okay. Are you *sure* that you have no code in an "AfterUpdate"
or similar event that makes reference to the "Dirty" property of a form? While
the "frmevaluation" module is open in the code window, select, from the menu,
"Edit, Find" and enter "dirty" in the "Find What" box and set the "Search" to
"Current Module". If it locates the "Dirty" property and that property is
appurtenant to "Me" or "frmevaluation", then you have likely located your
problem.
 
B

Bruce M. Thompson

This database is still functioning on other PCs for people out of the state.
They are not getting errors, yet the code has not changed. They are using
the version I released mid September, which gives me the error on both PCs.

Have you retrieved a copy from one of the other "out of state" PCs, or are you
relying on your own copy from September? It sounds as though there may be either
a difference in the service pack levels of Access and/or Jet between the
machines on which the errors materialize and the machines on which they don't,
or there is a creeping corruption taking place as your application progresses.
See the following page at Tony Toews' web site for information on Service Packs
and Security Patches applicable to Access:

Microsoft Access Fixes, Patches and Updates
http://www.granite.ab.ca/access/msfixes.htm

Note that Jet 4.0 is now up to SP8, which was included in Windows 2000 SP4.
 
M

M Skabialka

I've now applied all the patches possible, Office and Windows.

I took a working copy of the database and tables from the server it is
maintained on.

Same error, even though users are currently having no problems.

I am at my wits end here!
Mich
 
B

Bruce M. Thompson

One PC gives the error whenever I use this syntax:
Forms!frmevaluation!frmCube1!C2P3
or
Forms!frmevaluation!frmCube1.Controls("C2P3")

The other doesn't on this earlier version from months ago. Both have the
error on the newest version.

Just for a kicks, try replacing the above with:

Forms!frmevaluation!frmCube1.Form.Controls("C2P3")

This had come to mind earlier (and it has just been suggested to me by another),
but your approach worked well on my machine, so I didn't mention it before.
 
M

M Skabialka

Already tried it, doesn't work. Any line of code containing
frmname.Controls("anything here") gives the error.

I have resurrected an old Win98SE machine, put Office 2000 on and the
September working copy is bug-free. I am now importing one by one the
queries, forms and reports from the latest buggy copy on the other machine,
and checking that it still runs.

I sincerely believe that a Windows 2000 update from last week has caused
this mess; there was an up to the Jet engine, plus a service pack. This is
scary becuase I know the users will be doing the same thing, and there are
over 50 of them allowed access to the database...

I'll post to the group when I have finshed importing the changed objects to
let you know the outcome of this.

Thanks for all your help and suggestions so far...
Mich
 
B

Bruce M. Thompson

Already tried it, doesn't work. Any line of code containing
frmname.Controls("anything here") gives the error.

I had a feeling that it wouldn't work, but when things are acting funny, you
don't always know where the solution might be.
I have resurrected an old Win98SE machine, put Office 2000 on and the
September working copy is bug-free. I am now importing one by one the
queries, forms and reports from the latest buggy copy on the other machine,
and checking that it still runs.

I sincerely believe that a Windows 2000 update from last week has caused
this mess; there was an up to the Jet engine, plus a service pack. This is
scary becuase I know the users will be doing the same thing, and there are
over 50 of them allowed access to the database...

I have been trying to watch for any feedback on these issues, as well.
I'll post to the group when I have finshed importing the changed objects to
let you know the outcome of this.

Thanks. I'll keep my eyes open and hope that I don't miss it.
Thanks for all your help and suggestions so far...

You're quite welcome. I only wish I could have been more helpful.
 

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