Checkbox = Not [intField]

H

H. Martins

I have one TripleState CheckBox bound to some intField. Works OK.

I want to have a second CheckBox displaying the inverse of intField.
If I do "= Not [intField]" it will display the inverse of the other
CheckBox but I can't change the record clicking this second CheckBox.

I tried to use the OnClick and under VBA change intField as .

if ...
[intField] = NULL ... or whatever.

So, it loks that I can not change IntField using OnClick.

I suppose I am trying the wrong approach.

Thanks
Henry.
 
D

Dirk Goldgar

H. Martins said:
I have one TripleState CheckBox bound to some intField. Works OK.

I want to have a second CheckBox displaying the inverse of intField.
If I do "= Not [intField]" it will display the inverse of the other
CheckBox but I can't change the record clicking this second CheckBox.

I tried to use the OnClick and under VBA change intField as .

if ...
[intField] = NULL ... or whatever.

So, it loks that I can not change IntField using OnClick.

I suppose I am trying the wrong approach.


Not necessarily. What is your exact code, and what happens when you click
the check box. In principle, what you say should work, so I'm guessing you
have an error in your code. For one thing, a test for

intField = Null

will never evaluate as True, no matter what the value of intField. But that
may not be the only problem.
 
H

H. Martins

I suppose I have to use CheckBox.LostFocus because OnClick somehow
disable (or overlap) field manipulation by VBA.

LostFocus works. In one of the ChkBoxes I have

=Not [hizAproveitamento]

In the other I have

=Not Not [hizAproveitamento] ' two nots to avoid control do record
update (sort of readonly)


Henry
 
J

John W. Vinson

I suppose I have to use CheckBox.LostFocus because OnClick somehow
disable (or overlap) field manipulation by VBA.

LostFocus works. In one of the ChkBoxes I have

=Not [hizAproveitamento]

In the other I have

=Not Not [hizAproveitamento] ' two nots to avoid control do record
update (sort of readonly)


Henry

Do you have a question, Henry? I didn't see one in this...
 
H

H. Martins

John W. Vinson:
Do you have a question, Henry? I didn't see one in this...

John,

My last post was not a question but an answer to me previous question.

There may be a better answer but for the moment a working answer.

Henry
 

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