Clear Button on a form

I

idtjes3

Hello,

I have a form with several different check boxes on it. There is also a
"Clear All" button which removes all the checks on the entire form by setting
the default value to ="". What happens is the user places a check in the box
of an item they wish to display in a report. they hit the preview button and
the report pops up. I select one item and hit preview, everything works ok.
The problem I'm having is if i close that reports preview, hit the "Clear
All" button on my form to reset it , select a single item again and hit
preview, I get a report that lists every item in our database. Its like the
report is ignoring my check box filters and just displaying every item. Now
if I close the form and reopen it and select a few items again, It only lists
those items. Does anyone know whats up?
 
M

Maurice

Well it could be that the source has to requery to generate the exact
results. So what you could try is place a me.requery before you open the
report (place it in the code of the button which opens the report).
 
I

idtjes3

OK I tried using both Me.Requery and DoCmd.Rrequery in the button to launch
the report, the button that clears the form, and on the after update box of
the forms properties, all with no success. I am getting the resultsfor my
report from a query. The check boxes actually control which item the query
will display on the report. Should i create a command to requery the query
itself?
 
I

idtjes3

Maurice,

I managed to fix the problem. My clear all button was set to return the
form to a blank one by using [CheckBoxWhatever]= "" . What i did was switched
it to say [CheckBoxWhatever]= Null , and that did it. Why is that you
suppose? is it because "" is technically giving the box a value while Null is
making it blank? Oh well one of MS Access's many little quirks. Thanks for
your help.
 

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