Results 1 to 11 of 11
  1. #1
    Join Date
    Feb 2004
    Location
    Napa, CA
    Posts
    7

    Unanswered: X in form to represent other data

    I have an Access Form that contains over 75 check boxes. I Need to set it up so that when a user checks the box with an "X", the check mark represents a complete statement that can be merged into a Word document. I know how to complete the merge once the query is complete, I am just not clear on how to set up the check box system so that "X" is short for the statement that it represents. I know this can be done, I just need some guidance on where to start.

    Thanks in advance for your help.


    Dave
    davedenn@sbcglobal.net

  2. #2
    Join Date
    Mar 2003
    Posts
    46
    Hi there,

    You could create the statements in a query e.g.

    Statement1:Iif([CheckBox1]=Yes,"StatementforCheckBox1","")
    Satetement2: Iif([CheckBox2]=Yes,"StatementforCheckBox2","")

    etc.etc.

    These statements can then be merged to a Word document.

    Can anyone out there think of a less 'long-winded' solution?

    Regards
    C

  3. #3
    Join Date
    Feb 2004
    Location
    Napa, CA
    Posts
    7
    Thanks for your reply to my situation. If I use your suggestion, wil I have to bind each check box to its data statement in the table? Will I have to quote the entire statement in the query as it is in the table to enable the correct verbage to merge into the Word document?


    Thanks for your help.


    Dave

    davedenn@sbcglobal.net

  4. #4
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Smile Re: X in form to represent other data

    Originally posted by ddennis
    I have an Access Form that contains over 75 check boxes. I Need to set it up so that when a user checks the box with an "X", the check mark represents a complete statement that can be merged into a Word document. I know how to complete the merge once the query is complete, I am just not clear on how to set up the check box system so that "X" is short for the statement that it represents. I know this can be done, I just need some guidance on where to start.

    Thanks in advance for your help.


    Dave
    davedenn@sbcglobal.net
    Is the statement the same with the exception of what the checkbox represents? In other words, does the checkbox represent the "Where" clause in an SQL statement?
    Gregg


    DAO, ADO, SQL, Automation and anything else I can pick up.

  5. #5
    Join Date
    Feb 2004
    Location
    Napa, CA
    Posts
    7

    Re: X in form to represent other data

    Yes, It is frequently an entire paragraph!

    Dave


    Originally posted by basicmek
    Is the statement the same with the exception of what the checkbox represents? In other words, does the checkbox represent the "Where" clause in an SQL statement?

  6. #6
    Join Date
    Mar 2003
    Posts
    46
    Sorry, I think I completely misunderstood what you needed...

    Few questions:

    Can a user only ever check 1 of the checkboxes?

    Could you confirm quickly - When you say 'statement' are you referring to an SQL statement or to a text statement (eg. "Notification Required")?

    Cheers
    C

  7. #7
    Join Date
    Feb 2004
    Location
    Napa, CA
    Posts
    7
    The user can check any variety of boxes on the form (each form usually contains about 50-75 check boxes as well as combos, etc. As for the "statment," they are usually sentences or just single words in text.


    Dave



    Originally posted by CCC
    Sorry, I think I completely misunderstood what you needed...

    Few questions:

    Can a user only ever check 1 of the checkboxes?

    Could you confirm quickly - When you say 'statement' are you referring to an SQL statement or to a text statement (eg. "Notification Required")?

    Cheers
    C

  8. #8
    Join Date
    Mar 2003
    Posts
    46
    Assuming that the options that the user has chosen are not stored anywhere and that the Form resets itself after it has been merged to word and closed:

    Set up a query with your statement table (table with fields Statement1, Statement2,....) - there should only be one record in this table.

    In the query grid write:

    Statement1: Iif([Forms]![YourForm]![CheckBox1]=Yes,[Statement1],Null)

    Satatement2: Iif([Forms]![YourForm]![CheckBox2]=Yes,[Statement2],Null)

    etc.

    You should then be able to use Statement1, Statement2 etc. to merge to your Word doc.

    This is assuming, of course, that you need each of the statements individually, otherwise you simply combine the statement to create one long output string eg.

    LongStatement :Iif([Forms]![YourForm]![CheckBox1]=Yes,[Statement1],Null) & Iif([Forms]![YourForm]![CheckBox2]=Yes,[Statement2],Null)

    Is this any nearer to what you need?
    There is a different way of merging to Word (using bookmarks) which would present a somewhat different solution...
    C

  9. #9
    Join Date
    Feb 2004
    Location
    Napa, CA
    Posts
    7

    Re: X in form to represent other data

    The statements are static and do not change. What I need is to have the check box be the "interface" (I'm not sure of the right word for this) so that when checked, the statement (and not the check mark) is stored in the table for that particular record.


    Originally posted by basicmek
    Is the statement the same with the exception of what the checkbox represents? In other words, does the checkbox represent the "Where" clause in an SQL statement?

  10. #10
    Join Date
    Feb 2004
    Location
    Napa, CA
    Posts
    7

    Re: X in form to represent other data

    Originally posted by ddennis
    The statements are static and do not change. What I need is to have the check box be the "interface" (I'm not sure of the right word for this) so that when checked, the statement (and not the check mark) is stored in the table for that particular record.

  11. #11
    Join Date
    Jun 2003
    Posts
    6

    Re: X in form to represent other data

    Originally posted by ddennis
    The statements are static and do not change. What I need is to have the check box be the "interface" (I'm not sure of the right word for this) so that when checked, the statement (and not the check mark) is stored in the table for that particular record.
    My problem is that some of the statements are over 255 words long! They won't fit in the "field name" of the table. I can put them in the individual records, but they are too long for the field name so I am stumped and don't know how to proceed from here.

    davedenn@sbcglobal.net

Posting Permissions

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