• Clearing all checkboxes in a table (2003)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Clearing all checkboxes in a table (2003)

    Author
    Topic
    #427621

    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

    Viewing 0 reply threads
    Author
    Replies
    • #991307

      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.

      • #991338

        Hans!

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

        Drew

    Viewing 0 reply threads
    Reply To: Clearing all checkboxes in a table (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: