Checkbox = Not [intField]

  • Thread starter Thread starter H. Martins
  • Start date Start date
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.
 
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.
 
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
 
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...
 
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
 
Back
Top