Error 2467

T

TommyD

I have 2 applications with different symptoms but I think the same cause. One
application does not throw any errors it just doesn't display the data on the
subforms and the other app throws the 2467 error at the following code on the
subform:

varAdr = Parent![sfrmTestLog].Form![txtAdrNumber]

Both apps were developed in Access 2000 and the problem is only on XP
machines running Access 2003. Kb906460 says that SP2 fixed this problem?? I
checked one machine's version and it was 11.6566.8132, which should have SP2.

I even converted the first app (no data displayed) to 2003 with the same
results.

Any idea? Need more info?

Thanks much.
 
A

Allen Browne

In what event are you doing this?

I assume your code is in one of the events of a subform, and you are
referring to a text box on another subform of the same main form.

When the main form loads, one of the subforms loads before the other. If the
other subform has not loaded yet, then this code will fail with error 2467.
It depends on the load order. That may be the order in which you added the
subforms to the main form, but you don't really have control over that.

So, if this code is executing early in the process (such as the open, load
or possibly the current event of the subform), you may need to add error
handling that just ignores the error until the other subform has loaded.
 
T

TommyD

I was mistaken as to where the code was breaking. I'll try to be brief.

I have a tab control on a main form with subforms on two tabs. When the main
form opens the subform on tab 1 gets populated with data. The user selects
tab 2 when he wants to see data associated with an "ADR" number of the
selected record on tab 1. In the tab_change event on the main form the
following code is throwing the error

strBuildBlock = Nz(Me![sfrmParameters].Form!Combo455, "")

Combo455 is a combo box on tab 2's subform(sfrmParameters). So I guess
Combo455 has not been populated at this point. I can understand that and I
will re-think my logic. What I don't understand is why the error happens in
Access 2003 and not 2000. Maybe I don't really need to know why. I just need
to accept it and move on. :)

Thanks again.

TommyD

Allen Browne said:
In what event are you doing this?

I assume your code is in one of the events of a subform, and you are
referring to a text box on another subform of the same main form.

When the main form loads, one of the subforms loads before the other. If the
other subform has not loaded yet, then this code will fail with error 2467.
It depends on the load order. That may be the order in which you added the
subforms to the main form, but you don't really have control over that.

So, if this code is executing early in the process (such as the open, load
or possibly the current event of the subform), you may need to add error
handling that just ignores the error until the other subform has loaded.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

TommyD said:
I have 2 applications with different symptoms but I think the same cause.
One
application does not throw any errors it just doesn't display the data on
the
subforms and the other app throws the 2467 error at the following code on
the
subform:

varAdr = Parent![sfrmTestLog].Form![txtAdrNumber]

Both apps were developed in Access 2000 and the problem is only on XP
machines running Access 2003. Kb906460 says that SP2 fixed this problem??
I
checked one machine's version and it was 11.6566.8132, which should have
SP2.

I even converted the first app (no data displayed) to 2003 with the same
results.

Any idea? Need more info?

Thanks much.
 
T

TommyD

I almost forgot about my other app problem. This one has the same subform in
two locations on the main form with different Link Master Fields. In Access
2000 the data displays fine. In Access 2003 the data will not display. The
app has other main form/subform's that behave in the same way.

Allen Browne said:
In what event are you doing this?

I assume your code is in one of the events of a subform, and you are
referring to a text box on another subform of the same main form.

When the main form loads, one of the subforms loads before the other. If the
other subform has not loaded yet, then this code will fail with error 2467.
It depends on the load order. That may be the order in which you added the
subforms to the main form, but you don't really have control over that.

So, if this code is executing early in the process (such as the open, load
or possibly the current event of the subform), you may need to add error
handling that just ignores the error until the other subform has loaded.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

TommyD said:
I have 2 applications with different symptoms but I think the same cause.
One
application does not throw any errors it just doesn't display the data on
the
subforms and the other app throws the 2467 error at the following code on
the
subform:

varAdr = Parent![sfrmTestLog].Form![txtAdrNumber]

Both apps were developed in Access 2000 and the problem is only on XP
machines running Access 2003. Kb906460 says that SP2 fixed this problem??
I
checked one machine's version and it was 11.6566.8132, which should have
SP2.

I even converted the first app (no data displayed) to 2003 with the same
results.

Any idea? Need more info?

Thanks much.
 
A

Allen Browne

The events do fire differently in different versions. Some events (such as
Form_Current) may even fire a different number of times in different
versions in different situations.

It might be informative to add error handling to your code. Trap the error
like this:
On Error Goto ErrHandler
'other code here
ExitHandler:
Exit Sub
ErrorHandler:
If Err.Number = 2467 Then
Debug.Print "Error 2467 in " & Me.Name & " at " & Now()
Else
'Whatever you want
End If
Resume ExitHandler

This would give you an indication of *when* the error is occurring. For
example, you may find it's only when the form first loads.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

TommyD said:
I was mistaken as to where the code was breaking. I'll try to be brief.

I have a tab control on a main form with subforms on two tabs. When the
main
form opens the subform on tab 1 gets populated with data. The user selects
tab 2 when he wants to see data associated with an "ADR" number of the
selected record on tab 1. In the tab_change event on the main form the
following code is throwing the error

strBuildBlock = Nz(Me![sfrmParameters].Form!Combo455, "")

Combo455 is a combo box on tab 2's subform(sfrmParameters). So I guess
Combo455 has not been populated at this point. I can understand that and I
will re-think my logic. What I don't understand is why the error happens
in
Access 2003 and not 2000. Maybe I don't really need to know why. I just
need
to accept it and move on. :)

Thanks again.

TommyD

Allen Browne said:
In what event are you doing this?

I assume your code is in one of the events of a subform, and you are
referring to a text box on another subform of the same main form.

When the main form loads, one of the subforms loads before the other. If
the
other subform has not loaded yet, then this code will fail with error
2467.
It depends on the load order. That may be the order in which you added
the
subforms to the main form, but you don't really have control over that.

So, if this code is executing early in the process (such as the open,
load
or possibly the current event of the subform), you may need to add error
handling that just ignores the error until the other subform has loaded.

TommyD said:
I have 2 applications with different symptoms but I think the same
cause.
One
application does not throw any errors it just doesn't display the data
on
the
subforms and the other app throws the 2467 error at the following code
on
the
subform:

varAdr = Parent![sfrmTestLog].Form![txtAdrNumber]

Both apps were developed in Access 2000 and the problem is only on XP
machines running Access 2003. Kb906460 says that SP2 fixed this
problem??
I
checked one machine's version and it was 11.6566.8132, which should
have
SP2.

I even converted the first app (no data displayed) to 2003 with the
same
results.

Any idea? Need more info?

Thanks much.
 

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