Checkbox Bug

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.
 
N

nobody

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.
 

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