• Report text fields (a97)

    Author
    Topic
    #377478

    Hello,

    My report runs of a query with the parameter for [month]. What I want to do is convert the user input of “1” to January, “2” to Febuary, etc, when the report opens.

    The Month field is a text box, within the header of my report.

    I have tried setting the control source =IIf([Month]=”7″,”July”,”OTHEr”), but am having no joy.

    Can anyone point me in any direction!!

    Cheers,

    Jonathon

    Viewing 1 reply thread
    Author
    Replies
    • #621758

      Rather than using the iif statement why not try the Choose statement. It works as follows:
      =Choose([Month],”January”,”February”, …etc…)
      HTH
      Pat smile

    • #621824

      Pat has already given you a good answer. Here is an alternative, just to demonstrate that there are often different ways to achieve the same result:

      =Format(DateSerial(2002, [Month], 1), “mmmm”)

      DateSerial(2002, [Month], 1) returns the date value corresponding to the 1st of [Month] in 2002 (the 2002 is not essential, it could be any other year).
      Format(…, “mmmm”) returns the full name of the month.

    Viewing 1 reply thread
    Reply To: Report text fields (a97)

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

    Your information: