开发者

Check only one checkbox in a subform

I have what I believe to be a common question about using a subfo开发者_如何学编程rm in datasheet view in access. My subform has a checkbox on it which performs some logic but checking any checkbox checks that checkbox for all the records. From what I see this behaviour can be altered by linking the checkbox to a datasource. However in my case the subform is based on a non-updatable query so binding to any member of the dataset results in the checkbox being uncheckable.

I am imagining some dastardly temporary table workarounds for this problem but they all feel like horrific hacks. Is there some way around this which won't make me feel too dirty?


So all the data controls, except that one check box, are bound to read-only query fields. And the check box is not bound to anything.

You could base your form on a disconnected ADO recordset. See this article at Database Journal: Create In-Memory ADO Recordsets

That technique seems less dirty to me than using a temporary table to accommodate the check box. Although you didn't tell us anything about the purpose of the check box, I'll hazard a guess this could work for your application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜