Results 1 to 3 of 3
  1. #1
    tmcrouse is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Apr 2009
    Posts
    169

    format column in table

    I know in creating columns in a table where I have date/time you can select long short, etc. But, I want my column name to be YR and the values of 2014, 2015, 2016, 2017 all the way to 2020. So I end up with 7 rows. Then another date related table that houses the months. It will have a column name of MTH and the values Jan through Dec so a total of 12 rows. I have tried in format putting YYYY and MMM but when entering the data, it gives me an error saying I have to convert, ask for help or click the calendar and choose a date. I don't want to choose month, day and year. I just want the year.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Calendar picker only works with a date field. Just the year or month or day is not a date entity. Cannot save just those parts into a date/time field.

    Either save the date value with all date parts into a single date/time field or use number type fields to save the parts, in which case can't use date picker. Can, however, set combobox with a RowSource that is a ValueList.
    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
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Not sure of your real requirement, but you can store a date in the field; then use the Year() function to display/select only the Year portion. Similarly with the Month() and Day() functions.

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

Similar Threads

  1. Date Format Different in same column
    By drunkenneo in forum Access
    Replies: 2
    Last Post: 01-20-2014, 01:55 PM
  2. Replies: 4
    Last Post: 09-04-2013, 06:40 AM
  3. Table Column Format/Input Mask
    By mkc80 in forum Access
    Replies: 7
    Last Post: 11-23-2012, 02:27 PM
  4. Replies: 5
    Last Post: 04-18-2012, 10:54 AM
  5. Replies: 3
    Last Post: 06-20-2011, 03:09 PM

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