Results 1 to 4 of 4

Thread: custom date

  1. #1
    Join Date
    Mar 2004
    Posts
    361

    Unanswered: custom date

    I need some help converting a date and number by using a custom format.

    First, the Short date property in access doesn't give me what I'm looking for . I need the user to type in a date and have it be converted into July 26, 2004. So I need to convert 07/26/2004 into July 26, 2004. I am new to this so I might need a little hand holding.

    Second. I need to convert a number using a custom format to include the thousand seperator. Exp, the user types 1234 and I need 1,234. I used the standard number property but the number won't carry the separator when I merge the value into word.

    Thank for any help.

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    When you want to Format something (Text, dates, numbers etc.) use the built in Format function:

    For your date:

    Format(Me.myDateTextBox, "mmmm dd, yyyy")


    For your numbers (adding commas):

    Format(Me.myNumberTextBox, "###,###,###,###")



    Usage Example:

    Me.myTextBox = Format(Me.myTextBox, "mmmm dd, yyyy")

    OR

    Me.myTextBox = Format(Me.myTextBox, "###,###,###,###")



    Hope this helps

  3. #3
    Join Date
    Mar 2004
    Posts
    361
    ok that would seem to work but where do I type in the format function? Sorry for such a dumb questin but i am very new to using forms in access. Thanks

  4. #4
    Join Date
    Nov 2003
    Posts
    1,487
    Place the code into the BeforeUpdate event for the respective Controls (TextBoxes).


Posting Permissions

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