Access 2002/Windows XP BUG

P

Paul Overway

This is a difficult one to explain, but I am seeing a bug when Access 2002
is used on a system with Windows XP (Home and Pro). The problem is with a
subform on a wizard.

The following code is executed when the user goes to the next page in the
wizard:

Select Case mintCurrentPage
Case 1 To 3, 7 To clsAddEntityWiz1.LastPage
Me.fsubPage.LinkChildFields = "MemberID"
Me.fsubPage.LinkMasterFields = "txtMemberID"
Case 4 To 6
If IsNothing(Me.txtMemberID_Partner) Then
Me.fsubPage.LinkChildFields = ""
Me.fsubPage.LinkMasterFields = ""
Else
Me.fsubPage.LinkChildFields = "MemberID"
Me.fsubPage.LinkMasterFields = "txtMemberID_Partner"
End If
End Select

txtMemberID_Partner is null when the problem occurs. Nevertheless, in step
4, the page is being displayed as if LinkChildFileds = "MemberID" and
LinkMasterFields = "txtMemberID". This is causing me a lot of grief with
customers running Access 2002 on Windows XP.

The database is compiled in 2000 format. The problem does not occur on
systems with Access 2002 and Windows 2000. Nor does it occur on systems
with Access 2000 on any OS. The same code base is used in Access 97...and
the problem does not occur with any OS. Anyone else run into a similar
problem? Any resolution?

TIA
 
A

Allen Browne

Is txtMemberID_Partner a text box?

If so, IsNothing() will always return False, since the object (a text box)
will never be Nothing (an unassigned object variable). Did you intend to
test for Null?
If IsNull(Me.txtMemberID_Partner) Then

Paul, I have found that it is very easy to crash Access ("illegal operation,
shut down by Windows") by reassigning the LinkChildFields/LinkMasterFields
on the fly, esp. where there is a chance of Access misunderstanding the data
types (e.g. a calculated query field, or unbound text box). My preferred
workaround is to leave the LinkChildFields/LinkMasterFields blank, and
restrict the subform records by reassigning the RecordSource instead.
 
P

Paul Overway

Allen:

IsNothing is a UDF that tests for null, empty string, and nothing. It is
thoroughly tested and works in this situation and literally 1000s of others.
So, the result will not always be False.

Through further testing I have determine the following:

1. txtMemberID_Partner is in fact null and IsNothing returns true (as
expected)
2. LinkChildFields and LinkMasterFields are being assigned empty string (as
expected.)
3. The subform is NOT being requeried...or is being requeried improperly
4. Initial observations by users about the OS being a factor were
misleading/confusing. The bug exists in Access 2002 and Access 2003...in
any usable OS. The bug does not exist in Access 97 or Access 2000...in any
OS.

While I appreciate your experience with LinkChildFields/LinkMasterFields...I
have never seen that behavior myself. This app is in production and this
specific form is used 100s of times daily by many users. I've never had it
crash...but the bug has become an issue because I have users starting to
move to Access 2002 and Access 2003. In any case, there is no valid reason
for this not to work. The LinkChildFields and LinkMasterFields properties
are supposedly designed for this use...so, Microsoft has a bug to fix.

I've implemented a work-around, although

--
Paul Overway
Logico Solutions, LLC
www.logico-solutions.com


Allen Browne said:
Is txtMemberID_Partner a text box?

If so, IsNothing() will always return False, since the object (a text box)
will never be Nothing (an unassigned object variable). Did you intend to
test for Null?
If IsNull(Me.txtMemberID_Partner) Then

Paul, I have found that it is very easy to crash Access ("illegal operation,
shut down by Windows") by reassigning the LinkChildFields/LinkMasterFields
on the fly, esp. where there is a chance of Access misunderstanding the data
types (e.g. a calculated query field, or unbound text box). My preferred
workaround is to leave the LinkChildFields/LinkMasterFields blank, and
restrict the subform records by reassigning the RecordSource instead.
 

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