Results 1 to 7 of 7
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Label with date format (03)

    I have report with a label which requires input from the end user such as 12/31/2006. Within the label itself I have formatted it to display mmm dd, yyyy.

    Unfortunately it is still being displayed as 12/31/2006. Is it possible to overcome the formatting issue?

    Thanks,
    John

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

    Re: Label with date format (03)

    Do you really mean a label? Labels don't have a Format property. If you set the Caption of a label in code, you can do it like this:
    <code>
    Me.LabelName.Caption = Format(SomeDate, "mmm dd, yyyy")
    </code>
    where LabelName is the name of the label and SomeDate is the date you want to display.

    If that is not what you meant, please explain.

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Label with date format (03)

    Hans,

    When I highlight the object in the upper left corner it says "label 14". When I right click on the object and select properties, it says "text box: label 14". I'm confused.

    Regards,
    John

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

    Re: Label with date format (03)

    the name of a control is arbitrary, it doesn't necessarily indicate the control type. Apparently it is a text box. What is its Control Source?

  5. #5
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Label with date format (03)

    Hans,

    In the control source I have "Enter Bank Statement Date MM/DD/YYYY".

    Regards,
    John

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

    Re: Label with date format (03)

    Now I'm confused. Try the following (make a backup first, to be on the safe side):
    - Open the report in design view.
    - Set the Control Source to
    <code>
    =CDate([Enter Bank Statement Date MM/DD/YYYY])
    </code>
    - Set the Format property to mmm d, yyyyy

  7. #7
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Label with date format (03)

    Hans,

    It worked.

    Thank you,
    John

Posting Permissions

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