Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Jun 2002
    Location
    London, Gtr London, England
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Report text fields (a97)

    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

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Report text fields (a97)

    Rather than using the iif statement why not try the Choose statement. It works as follows:
    =Choose([Month],"January","February", ...etc...)
    HTH
    Pat <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

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

    Re: Report text fields (a97)

    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.

Posting Permissions

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