Option groups and reports

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Y Plas

    Option groups and reports

    Hello all, i'm a new user in this group and was wandering if anyone could
    assisst me with a problem:

    I have a form with option groups within it outputig their results to a table
    called tblTNAform, with contain a very, very large number of fields linked
    to option groups.
    My problem is that i wish to display these results as text, not numbers,
    and i've run out of ideas. The results of the form may be stored as a number
    in the tables but must display as text in the report.

    P.S. My VBA is not so good, so any code must be shown in an idiot-freindly
    way!


  • fredg

    #2
    Re: Option groups and reports

    On Sun, 18 Apr 2004 20:56:34 +0000 (UTC), Y Plas wrote:
    [color=blue]
    > Hello all, i'm a new user in this group and was wandering if anyone could
    > assisst me with a problem:
    >
    > I have a form with option groups within it outputig their results to a table
    > called tblTNAform, with contain a very, very large number of fields linked
    > to option groups.
    > My problem is that i wish to display these results as text, not numbers,
    > and i've run out of ideas. The results of the form may be stored as a number
    > in the tables but must display as text in the report.
    >
    > P.S. My VBA is not so good, so any code must be shown in an idiot-freindly
    > way![/color]

    As you have found, an Option Group value is a number.

    To display the OptionGroup's value as text in a report, simply use an
    unbound text control.
    With just 3 options:

    =IIf([OptionGroupFiel d] = 1, "TextA",IIf ([OptionGroupFiel d] = 2,
    "TextB","TextC" ))

    If the group has many more options you could use Switch() or Choose()
    in an Access Control Source, or Select Case in VBA code to convert the
    number value to text.

    Look up Switch(), Choose(), and Select Case in VBA Help.
    --
    Fred
    Please only reply to this newsgroup.
    I do not reply to personal email.

    Comment

    • fredg

      #3
      Re: Option groups and reports

      On Sun, 18 Apr 2004 20:56:34 +0000 (UTC), Y Plas wrote:
      [color=blue]
      > Hello all, i'm a new user in this group and was wandering if anyone could
      > assisst me with a problem:
      >
      > I have a form with option groups within it outputig their results to a table
      > called tblTNAform, with contain a very, very large number of fields linked
      > to option groups.
      > My problem is that i wish to display these results as text, not numbers,
      > and i've run out of ideas. The results of the form may be stored as a number
      > in the tables but must display as text in the report.
      >
      > P.S. My VBA is not so good, so any code must be shown in an idiot-freindly
      > way![/color]

      As you have found, an Option Group value is a number.

      To display the OptionGroup's value as text in a report, simply use an
      unbound text control.
      With just 3 options:

      =IIf([OptionGroupFiel d] = 1, "TextA",IIf ([OptionGroupFiel d] = 2,
      "TextB","TextC" ))

      If the group has many more options you could use Switch() or Choose()
      in an Access Control Source, or Select Case in VBA code to convert the
      number value to text.

      Look up Switch(), Choose(), and Select Case in VBA Help.
      --
      Fred
      Please only reply to this newsgroup.
      I do not reply to personal email.

      Comment

      • Y Plas

        #4
        Re: Option groups and reports


        "fredg" <fgutkind@examp le.invalid> wrote in message
        news:smgfjzr1tk zp.1368pfc1c36b z.dlg@40tude.ne t...[color=blue]
        > On Sun, 18 Apr 2004 20:56:34 +0000 (UTC), Y Plas wrote:
        >[color=green]
        > > Hello all, i'm a new user in this group and was wandering if anyone[/color][/color]
        could[color=blue][color=green]
        > > assisst me with a problem:
        > >
        > > I have a form with option groups within it outputig their results to a[/color][/color]
        table[color=blue][color=green]
        > > called tblTNAform, with contain a very, very large number of fields[/color][/color]
        linked[color=blue][color=green]
        > > to option groups.
        > > My problem is that i wish to display these results as text, not[/color][/color]
        numbers,[color=blue][color=green]
        > > and i've run out of ideas. The results of the form may be stored as a[/color][/color]
        number[color=blue][color=green]
        > > in the tables but must display as text in the report.
        > >
        > > P.S. My VBA is not so good, so any code must be shown in an[/color][/color]
        idiot-freindly[color=blue][color=green]
        > > way![/color]
        >
        > As you have found, an Option Group value is a number.
        >
        > To display the OptionGroup's value as text in a report, simply use an
        > unbound text control.
        > With just 3 options:
        >
        > =IIf([OptionGroupFiel d] = 1, "TextA",IIf ([OptionGroupFiel d] = 2,
        > "TextB","TextC" ))
        >
        > If the group has many more options you could use Switch() or Choose()
        > in an Access Control Source, or Select Case in VBA code to convert the
        > number value to text.
        >
        > Look up Switch(), Choose(), and Select Case in VBA Help.
        > --
        > Fred
        > Please only reply to this newsgroup.
        > I do not reply to personal email.[/color]

        Thanks Fred, worked a treat!


        Comment

        • Y Plas

          #5
          Re: Option groups and reports


          "fredg" <fgutkind@examp le.invalid> wrote in message
          news:smgfjzr1tk zp.1368pfc1c36b z.dlg@40tude.ne t...[color=blue]
          > On Sun, 18 Apr 2004 20:56:34 +0000 (UTC), Y Plas wrote:
          >[color=green]
          > > Hello all, i'm a new user in this group and was wandering if anyone[/color][/color]
          could[color=blue][color=green]
          > > assisst me with a problem:
          > >
          > > I have a form with option groups within it outputig their results to a[/color][/color]
          table[color=blue][color=green]
          > > called tblTNAform, with contain a very, very large number of fields[/color][/color]
          linked[color=blue][color=green]
          > > to option groups.
          > > My problem is that i wish to display these results as text, not[/color][/color]
          numbers,[color=blue][color=green]
          > > and i've run out of ideas. The results of the form may be stored as a[/color][/color]
          number[color=blue][color=green]
          > > in the tables but must display as text in the report.
          > >
          > > P.S. My VBA is not so good, so any code must be shown in an[/color][/color]
          idiot-freindly[color=blue][color=green]
          > > way![/color]
          >
          > As you have found, an Option Group value is a number.
          >
          > To display the OptionGroup's value as text in a report, simply use an
          > unbound text control.
          > With just 3 options:
          >
          > =IIf([OptionGroupFiel d] = 1, "TextA",IIf ([OptionGroupFiel d] = 2,
          > "TextB","TextC" ))
          >
          > If the group has many more options you could use Switch() or Choose()
          > in an Access Control Source, or Select Case in VBA code to convert the
          > number value to text.
          >
          > Look up Switch(), Choose(), and Select Case in VBA Help.
          > --
          > Fred
          > Please only reply to this newsgroup.
          > I do not reply to personal email.[/color]

          Thanks Fred, worked a treat!


          Comment

          Working...