Object Invalid or no longer set

mous

Registered User.
Local time
Today, 21:11
Joined
Sep 26, 2001
Messages
109
I've received the following message several times over on the click of a user button:

Object Invalid or no longer set.

Any ideas where I try to start looking for this error in my code, asumming this is the case, which I think it is.

Thanks

Dawn

I'm using Access 2000.
 
mous said:
Any ideas where I try to start looking for this error in my code

Are you pointed to any specific point in your code?
Have you put any error trapping on? If so, turn it off while you find the problem.

Post the code...
 
This is the code: I didn't post it earlier because I don't think you'll understand it.

Basically it IF .. Then .. Else Statements

It worked fine until I put in the below:

ElseIf [LoadBandYN] = "Y" And [DLHours].Value * 14 > [CLCTHrs] Then
'And [Fund_GLH] <> 0
[rate_fixed].Value = [Fund_GLH].Value
[GLH].Value = [ROUNDWAG].Value

ElseIf [LoadBandYN] = "Y" And [DLHours].Value * 14 > [CLCTHrs] Then
' And [Fund_GLH] = 0
[rate_fixed].Value = [ProgWeightA].Value
[GLH].Value = 120

Sorry I can't be more helpful.
 
You do realise that the two ELSE IF statements are identical and if the first condition is met then the second will never work.

You can drop the .Value part from the code.

P.S. Answer my part about error trapping, etc.
 
I realise they were the same. I've now corrected this. I've also taken out the .value part and do not have any error trapping on. But still the problem exists.

Thanks
 
I know the problem would still persist as you've only tidied the code.

Now, post the code for the whole event as it's hard to tell what's happening when you only give one branch of an IF...THEN...ELSE...END IF structure.
 

Users who are viewing this thread

Back
Top Bottom