Results 1 to 6 of 6
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Display a sentence when another value checked! (Access 2000 >)

    I've gone blank today! I just can't think how to do this!!! Help!

    I have a form that contains check box options. If the person checks a box, a report must not reflect the checkbox value, but a sentence that is linked to the checkbox! See example attachment!

    For example. If record 1 in the Allowed form is marked as buy, then a report must show "Allowed to buy!" and not the check box.
    "Is this making sense???"

    Please guide me in the right direction!
    Regards,
    Rudi

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Display a sentence when another value checked!

    Create a query based on the underlying table, and create calculated fields based on each of the yes/no fields such as the following:

    allowBuy: IIf([buy]=True,"Allowed to buy","not allowed to buy")

    Put these calculated fields on the report.
    Regards
    John



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

    Re: Display a sentence when another value checked! (Access 2000 >)

    I don't understand your setup. Does it make sense if the user checks all three check boxes in a record?

  4. #4
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Display a sentence when another value checked! (Access 2000 >)

    Thanx John and Hans.

    I think I must start again. The quick sample DB has confused the matter.

    In theory:
    I have a client that has an elaborate custom designed form in Word. The idea is to re-develop the form in Access to take advantage of history, and querying and reporting! The Word form captures one record of Life Insurance info via a series of tab controls. All these bits of info is finally compiled into a document that prints out the policy details in a template format! On one of the tabs is a check box group entitled "Proposed Insurance Cover", and it lists Life, Motor, Home, Assets....etc Insurance. (The client must tick off what choice of cover he requires! Could be one or several!) Now, based on which is checked, the final report (Policy Document) is set up to display a sentence describing the Cover he chose in more detail. (It could describe the one cover if one checkbox was checked, or several sentenses describing the several check boxes he checked).

    I cannot figure out how to generate a report that will list the descriptions of the cover a client chooses based on them filling out a form that has check boxes to choose the cover they want???

    Hope this is more clear!
    Tx
    Regards,
    Rudi

  5. #5
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Display a sentence when another value checked!

    Let's go back a step.

    It is always a good idea to concentrate on the underlying table structure first , then worry about the exact form layout to accommodate it.

    It seems to me you have three things. People, types of insurance, and peoples' interest in types of cover. So you should have three tables.

    Normally, this would be displayed as a person form, with an insurance cover subform, where you only create a record when the cover is wanted.

    If you want to use check boxes, you could write code that automatically created records in this table for each type of cover, whenever a new person was added, and include a yes/no field in this linking table.

    Each insurance type record could include a descriptive sentence, which could be included in a a query that selects people, insurance cover they want, and a description of that insurance. The report would then need to group by person so that the person info was only displayed once.
    Regards
    John



  6. #6
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Display a sentence when another value checked!

    Sorry for the late reply John,

    I'll try your advice and see if I can come right!
    Thx for your time !
    Regards,
    Rudi

Posting Permissions

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