Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Feb 2001
    Location
    Ontario, Canada
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Clearing all checkboxes in a table (2003)

    This should be a simple solution, but I am not yet familiar enough with VBA to figure this one out.

    I have a table that contains addresses for a mailing list. I have a toggle field (a checkbox) that allows me to quickly select the addresses I wish to make envelopes for. Once the printing is done, I want to be able to quickly deselect all of the selected checkboxes. Here are the steps I perform now:

    1) Open table (tbl,Businesses) and click the checkbox field (PrintToggle) for each address I wish to print an envelope for and then close the table.
    2) Open the report (rpt,AddressLabelsToPrint) which is based on a query (qry,Address to Print) that finds all records with the PrintToggle field set to TRUE. The report is laid out like an envelope.
    3) Select print and begin printing all the envelopes.
    4) When printing is done, close report and then open original table again.
    5) Uncheck all the PrintToggle checkboxes that are checked so it's ready for the next time I need the database and close the database.

    It's step 5 I'd like to perform with a click of a single button on my switchboard. Could someone please provide me with a simple VBA module that would perform that last step that I can call from my switchboard? I'd greatly appreciate the help!

    Thanks!!

    Drew

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Clearing all checkboxes in a table (2003)

    You don't really need VBA for step 5. You can use an update query:
    - Create a query in design view.
    - Add the Businesses table.
    - Add the PrintToggle field to the query grid.
    - Enter True in the Criteria line.
    - Select Query | Update Query.
    - Enter False in the Update to line.
    - Close and save the query.
    When you double click the query from the database window, it'll clear all check boxes (after prompting for permission)
    You can also run the query from a command button on a form.

  3. #3
    Star Lounger
    Join Date
    Feb 2001
    Location
    Ontario, Canada
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Clearing all checkboxes in a table (2003)

    Hans!

    You're my hero! You've come to the rescue several times. Thanks again!!!

    Drew

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •