Checkbox show all if not ticked

lynxbci

Registered User.
Local time
Today, 23:41
Joined
Nov 27, 2007
Messages
73
Hi,
I have a checkbox on a form (chk_Live)
I have a field in a table that is also boolean (MD_Live)

If the user ticks chk_Live i want to show only records where MD_Live = TRUE However if they leave un-ticked i want to show ALL records.

Under the MD_Live field, i tried this :-
Code:
IIf([Forms]![frm_menu]![Chk_Live]=True,TRUE,TRUE or FALSE)

This does not work, What is the correct syntax?

thank you
 
Code:
sub chk_Live_Afterupdate()
if chk_Live.value then
   me.filter = "[md_live]=true"
   me.filterOn = true
else
   me.filterOn = false
endif
end sub
 
Thanks,
I already had code doing it like that, but ideally i wanted in a SQL statement, but embedding it does not seem to work, so will stick to the code solution.
 

Users who are viewing this thread

Back
Top Bottom