Clear a yes/no check box on form close. should be easy..

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi all...

I hate that i'm posting this, but I can't figure out what is going on. I
have a form that I use to print a report of select inventory items, the form
has misc items including a checkbox named of all things "printtoreport".

When I check the box and then open my report, my report only shows those
items for the checkbox is true.

When I close my form, I want my checkbox "reset" to false.

Here is what I have, but isn't working:

OnClose of the form:

If Me.PrinttoReport = True then
Me.PrinttoReport = False

End if

Any suggestions?

Brook
 
hi all...

I hate that i'm posting this, but I can't figure out what is going on. I
have a form that I use to print a report of select inventory items, the form
has misc items including a checkbox named of all things "printtoreport".

When I check the box and then open my report, my report only shows those
items for the checkbox is true.

When I close my form, I want my checkbox "reset" to false.

Here is what I have, but isn't working:

OnClose of the form:

If Me.PrinttoReport = True then
Me.PrinttoReport = False

End if

Any suggestions?

Brook

Hopefully, the [printtoreport] check box is bound to a field in the
table.
You'll need an Update query to reset them all to unchecked.

In the Form's Close event:

CurrentDb.Execute "Update YourTable Set YourTable.[printtoreport] =
0;", dbFailOnError

Change YourTable to whatever the actual table name is.
 
fred,

Thanks for the post,

it worked perfectly, for some reason that didn't even enter my mind, I was
thinking I could do it straight from an If/then statement.

bRook

fredg said:
hi all...

I hate that i'm posting this, but I can't figure out what is going on. I
have a form that I use to print a report of select inventory items, the form
has misc items including a checkbox named of all things "printtoreport".

When I check the box and then open my report, my report only shows those
items for the checkbox is true.

When I close my form, I want my checkbox "reset" to false.

Here is what I have, but isn't working:

OnClose of the form:

If Me.PrinttoReport = True then
Me.PrinttoReport = False

End if

Any suggestions?

Brook

Hopefully, the [printtoreport] check box is bound to a field in the
table.
You'll need an Update query to reset them all to unchecked.

In the Form's Close event:

CurrentDb.Execute "Update YourTable Set YourTable.[printtoreport] =
0;", dbFailOnError

Change YourTable to whatever the actual table name is.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
f
 

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

Back
Top