Unchecking checkbox

A

Amateur

I have a DB called "writeinvoices"
I have a table "invoivetrading" with a checkbox called "monthinvoice"

I would like to create a command button which is automatically unchecking
this checkbox.
How can I do that?

Thanks
Klaus
 
B

BruceM

I guess you have some reason for not just unchecking the box. In the
command button's Click event:
Me.monthinvoice = False
 
A

Al Campagna

Amateur,
Why would you need a button to "automatically" uncheck a checkbox (make
it False)? If you click on a True checkbox, it toggles to False.
Each method requires one click (either click the button or click the
checkbox).

Perhaps you mean.... that when some event occurs on the form,
automatically change the checkbox from False to True? That would make more
sense....

Anyway...
Using the OnClick event of your button...
(Form name = frmMyForm, and Checkbox name = chkMyCheckbox)

Event procedure....
Me.chkMyCheckbox = False

Macro...
SetValue Item = Forms!frmMyForm!chkMyCheckbox
Expression = False
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
F

fredg

I have a DB called "writeinvoices"
I have a table "invoivetrading" with a checkbox called "monthinvoice"

I would like to create a command button which is automatically unchecking
this checkbox.
How can I do that?

Thanks
Klaus

As you can see from your other responses, your question is not very
clear.
Perhaps you mean you have a table with lots of records and you wish to
uncheck the check box field in ALL of the records at one time.
If that is the case, then code the click event of a command button:

CurrentDb.Execute "Update Involvetrading set
Involvetrading.monthinvoice = False;", dbFailOnerror

The above should be all on one line.
 

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