Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Oct 2003
    Location
    Tucson, Arizona, USA
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Check box entries into text field (2000 SP3)

    For quick data entry we use 5 check boxes to trace client referral information. Clients may have heard about our services from (1)Word of mouth (2)Newspaper (3)Internet (98)I do not wish to respond (99)Other.

    How can I get ONLY the checked ("true") selections from several check box controls and automatically save them into a single text field on the same form? The combined values need to be comma separated. For example:

    1,3,99

    (Please note: not comma can appear at either the beginning or the end of the text entry)

    Thanks for considering this!
    Brady

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Check box entries into text field (2000 SP3)

    I'm not sure if you want to do that for all records, or just selected records, and I'm not sure how you will use the info later, but that aside . . .

    I would basicaly use a series of IIF statements in a query to update existing data. If you want to do it on the fly as new records are added, you will have to use a BeforeUpdate event procedure to calculate the value and set the value of the text control. In that case it would be a series of IF statements in VBA to build the text value. The trick to not getting a leading or trailing comma is to add a comma before every value but the first added, so you would need a flag to track that you have added the first value, and that would involve a second IF statement nested inside each of the IF statements.
    Wendell

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Check box entries into text field (2000 SP3)

    This is NOT a good idea. You can use check boxes for data entry, certainly, but you should not put the results into a single field. Doing that makes it extremely difficult to get a count for something like all those who answered 1 or 2 but not 3. You would be better off storing the information in individual records related to the client record.
    Charlotte

  4. #4
    New Lounger
    Join Date
    Oct 2003
    Location
    Tucson, Arizona, USA
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Check box entries into text field (2000 SP3)

    Thank you Wendel!

  5. #5
    New Lounger
    Join Date
    Oct 2003
    Location
    Tucson, Arizona, USA
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Check box entries into text field (2000 SP3)

    I have to agree with you that this is not a good idea. It means a lot of extra work for me, but that is the format that the SBA in Washington (whom we report to) requires. They must have some way of sorting things out at their end. We will retain the check box values for client records in our Access database for the office. I just needed a way to make the report upload to SBA's site properly. Thanks for taking the time to write!

Posting Permissions

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