Error: 2455 - You entered an expression that has an invalid reference to the property

gavinjb

Registered User.
Local time
Today, 11:01
Joined
Mar 23, 2006
Messages
39
Hi,

We have a database which hasn't had the code changed for months, but has all of a sudden started to error on the following line of code

Code:
Forms![MainForm]![PaymentsSubForm].Form.RecordSource = "Payment"

The table Payment is a local table in the mdb database and is created by a make table query shortly before this statement is run, what we can't understand is why this works until one day it just decides to stop working.

We have even tried running it on an unpatched pc to see if a recently windows patch has broken something but it still gives the same error.

Does anyone have any ideas.

Thanks,


Gavin,
 
What version of Access are you using? Could it be Access 2003 with SP3 applied *but* without the HotFix installed?
 
Hi,
It is Mainly 2003 SP3 (I have tried it on 1 Windows 2000 & Access 2000 machine), I have tried applying the HotFix but it has made no difference.

Thanks,


Gavin,
 
Have you re-booted the PC? Have you now got a reference problem that you didn't have before? Have you tried importing your db into a fresh new mdb and then Compact and Repair?
 
Just tried rebooting, but has made no difference, I have also checked the references, I have both compacted and repaired this database and copied all the objects into another db and compacted and repaired that db.

What I cant figure out is why it also fails on source from several months ago which was working fine.

The only major change we have had recently is our network has been upgraded, but as the table in question is a local table in the database application sitting on the C drive, I cant see why that would cause a problem.

Thanks,



Gavin,
 
Hmm...could it be a timing issue? How about not creating the table but use a previous table and see if you still have the same problem? Where are you executing this code? You are going through the Forms collection so it should work from anywhere but I'm just curious.
 
I will try removing the make table and see if that makes any difference, I somehow doubt it will make a difference as if I put a debug point on the command which is raising the error, I can go and look at the table and see the new data in it at that point.

As for where it is being called, it is being called from an on update event on a combo box on a form.
 
I'm sorry Gavin but I'm running out of ideas. I know this is a stupid question but the "MainForm" is open right? The BeforeUpdate or AfterUpdate event of the ComboBox? Have you tried it on another machine per chance?
 
This is very strange, yesterday I tried it on 3 or 4 Pc's (running Windows 2000/XP and Office 2000/2003) and it wouldn't work on any of them, I have even rebooted them multiple times (the app has not been working for a couple of weeks), but this morning everything works.

Thanks for all your help,

Gavin,
 
I guess that is good news but I hate it when problems solve themselves. If they can fix themselves then they can break again on their own. Good luck with the project.
 
Thanks,

It is an old project I have inherited, I just hope it behaves itself for the next few months, as we are hoping to move it to asp.net at some time in the near future.
 
i think the problem proably was what RG suggested

your maketable query hadnt completed. when the next statement tried to use the table

you could get around this by testing to see that the table exists before trying to use it.
 
Hi All

Have had this problem on and off, Access 2010 this time. I try logging in as a different user on the same machine and the db works, move the user to another machine and the problem re-occurs. I suspect this is somethign to do with the users profile being corrupt as the problem "follows" them from machine to machine but other users on the same machine dont get the problem even though they are using the same front end database
 

Users who are viewing this thread

Back
Top Bottom