Checkbox Bug

  • Thread starter Thread starter alex
  • Start date Start date
A

alex

Hi,

It looks like I found a bug in fully patched Access XP ADP projects. The
problem is that if your code accesses a form's bound recordset object,
clicking any checkbox on the form causes application to crash.
A sample file demonstrating the problem can be downloaded here:

http://www.aleksoft.net/samples/AccessXP_BugSample.adp

Way to reproduce the problem:

Open the TestForm
Click the check box to change its state and optionally enter something into
the text box
Note that everything works as expected.

Now click the button - nothing happens
Optionally type anything into the text box, it still works.
Click the check box again and the application bombs up.

The code behind the button is this:

Dim x As Recordset
Set x = Me.Recordset
Set x = Nothing

It does not matter which property of the recordset you are accessing, result
is the same.

This is a description of the back-end table.

CREATE TABLE [TestTable] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[BitValue] [bit] NULL ,
[TextValue] [char] (10) NULL ,
CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED
(
[ID]
) ON [PRIMARY]
) ON [PRIMARY]
GO

Any comments?

Alex.
 
We still have more 2002 installations than 2003.
My workaround is to access the RecordsetClone property instead.
It would be nice to have the bug fixed.

Alex.

Arvin Meyer said:
I believe this has been corrected in Access 2003. My workaround in Access
2002 was to use comboboxes for boolean fields.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

alex said:
Hi,

It looks like I found a bug in fully patched Access XP ADP projects. The
problem is that if your code accesses a form's bound recordset object,
clicking any checkbox on the form causes application to crash.
A sample file demonstrating the problem can be downloaded here:

http://www.aleksoft.net/samples/AccessXP_BugSample.adp

Way to reproduce the problem:

Open the TestForm
Click the check box to change its state and optionally enter something into
the text box
Note that everything works as expected.

Now click the button - nothing happens
Optionally type anything into the text box, it still works.
Click the check box again and the application bombs up.

The code behind the button is this:

Dim x As Recordset
Set x = Me.Recordset
Set x = Nothing

It does not matter which property of the recordset you are accessing, result
is the same.

This is a description of the back-end table.

CREATE TABLE [TestTable] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[BitValue] [bit] NULL ,
[TextValue] [char] (10) NULL ,
CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED
(
[ID]
) ON [PRIMARY]
) ON [PRIMARY]
GO

Any comments?

Alex.
 
Back
Top