check

patatrac

Registered User.
Local time
Yesterday, 19:59
Joined
Jan 17, 2010
Messages
46
HI for all
I have problem with checkbox in a form and command query by it.
This code don't would work.
With -1 is ok but with 0(unchecked) the query result is null:banghead:


Code:
Like IIf([forms]![RE]![cont]=-1;[Campo1];[Campo1] Not Like " QS*" And ([Tabella1].[Campo1]) Not Like "AS*")
 
Are you absolutely sure that the checkbox is unchecked or is it in the null state? When opening your form you should set the checkbox to NO if it is an unbound checkbox otherwise it is null.

Code:
Private Sub Form_Open(Cancel As Integer)
   Me.CheckBoxNameHere = 0
End If
 
Hi Thanks
this is the file.
I don't understand why no work:cool:
 

Attachments

Users who are viewing this thread

Back
Top Bottom