Results 1 to 3 of 3
  1. #1
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    486

    Default value for dropdown

    I am trying to create a default value for a combo box but i cant get the month right. i would like to to be like 2016.01 but it only goes as 2016.1

    The code i am using is:



    Code:
    =CDbl(Year(Date()) & "." & (Month(Date()))
    how can i get it to put a 0 in front of the month if it is less than 2 digits?
    Thanks

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    Format(Date(), "yyyy.mm")
    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
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    486
    Works great, thanks

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

Similar Threads

  1. Replies: 1
    Last Post: 07-09-2014, 03:36 PM
  2. Replies: 9
    Last Post: 05-23-2011, 06:12 PM
  3. Set up a dropdown List
    By asherbear in forum Access
    Replies: 2
    Last Post: 06-24-2010, 06:45 AM
  4. Dropdown Input Box?
    By Acilladon in forum Programming
    Replies: 3
    Last Post: 06-09-2010, 07:39 AM
  5. Dropdown - need help please
    By sullyman in forum Access
    Replies: 8
    Last Post: 10-26-2009, 07:48 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