Results 1 to 4 of 4
  1. #1
    avarusbrightfyre is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Sep 2009
    Posts
    60

    Date and time formatting when pulling from a form field

    I'm creating automatic email messages and I'm pulling date and time from forms on the field, but the formatted date and time aren't transferring from the field, through the code and into the email. Is there a way to format a date or time field while pulling from a text box on a form using vba?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Try the Format function. The result is a string value. Maybe that will hold the structure.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    pdebaets is offline Competent Performer
    Windows Vista Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Los Angeles
    Posts
    235
    Agree with June7. Here's an example:

    Format(MyDateField,"yyyy mm dd")

  4. #4
    avarusbrightfyre is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Sep 2009
    Posts
    60
    Man do I feel dumb. I saw that when I googled, but somehow I just formatted it wrong. Thanks!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Date formatting in form textbox controls
    By secretary in forum Forms
    Replies: 1
    Last Post: 07-26-2011, 03:30 PM
  2. Date and Time Formatting
    By reidn in forum Access
    Replies: 8
    Last Post: 07-22-2011, 10:18 AM
  3. Date/Time Field Query...
    By Coffee in forum Queries
    Replies: 5
    Last Post: 07-05-2011, 11:27 PM
  4. Date/Time entry field on a form
    By Ted C in forum Forms
    Replies: 1
    Last Post: 06-22-2010, 12:28 PM
  5. date/time field
    By James890 in forum Database Design
    Replies: 1
    Last Post: 04-18-2007, 07:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums