Clear Yes / No Check box

  • Thread starter Thread starter Lenney97
  • Start date Start date
L

Lenney97

I've used access to create address book that have a Yes No Check box.
With this address book, I can select the address I want to print. I
did this by adding a Yes No Check box to each entry. Now the problem
is that I have to uncheck the boxes everytime I start the database. Is
there a way I can set all the boxes to No either on the start of the
file or when I exit the file? That way I don't have to go through and
uncheck the addresses before I start my selection.

Thank you for your help.
 
I've used access to create address book that have a Yes No Check box.
With this address book, I can select the address I want to print. I
did this by adding a Yes No Check box to each entry. Now the problem
is that I have to uncheck the boxes everytime I start the database. Is
there a way I can set all the boxes to No either on the start of the
file or when I exit the file? That way I don't have to go through and
uncheck the addresses before I start my selection.

Thank you for your help.

Run an Update query to set the yes/no field in the Table to False.
It'll be a mite faster if you use a criterion to select only those
records where it's true.

UPDATE AddressBook
SET PrintMe = False
WHERE PrintMe;

Save this query and execute it in some suitable event (such as the
Form's Open event).

John W. Vinson[MVP]
 
niuginikiwi said:
Run an update query that unchecks your records that you have already checked
to print either on the OnLoad or OnClose event properties of your form.
That should set everything else to unchecked.

Happy New Years

I'm a newbie with access can you give me detail instructions?

Thank you
 
I'm a newbie with access can you give me detail instructions?

Create a new Query based on your table.

Select the Yes/No field.

Put a criterion on the Criteria line of

True

(just the word, no quotes).

Change the Query to an Update query using the Query menu item, or the
query-type tool in the toolbar.

Type

False

again, just the word, no quotes, on the Update To line.

Save the query (for future use) - call it qryClearCheck or whatever
you would find memorable.

Either click the ! icon, or just doubleclick the query name in the
query window.

John W. Vinson[MVP]
 
Back
Top