Results 1 to 5 of 5
  1. #1
    byulogia@gmail.com is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Feb 2019
    Location
    Papua New Guinea
    Posts
    22

    Show Calenda


    I have a field named Date:

    I want it to show calendar when the user click on it (for data control)

    Please any help?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,527
    in a text box in form design, properties, format tab, set SHOW DATE PICKER = for dates
    same in table design for the field.

  3. #3
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,655
    date is a reserved word. You should change it.

  4. #4
    byulogia@gmail.com is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Feb 2019
    Location
    Papua New Guinea
    Posts
    22
    Thanks for this.
    I worked it out by going to the table design view, and change the data type to date, and the form shows calendar when I click on the field date.

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Also, if you would prefer the calendar to pop up when the Control receives Focus, without the user having to click on it, this bit of code will do that

    Code:
    Private Sub YourDateFieldName_GotFocus()
      DoCmd.RunCommand acCmdShowDatePicker
    End Sub

    To have it only pop up, on Focus, if the Textbox is empty

    Code:
    Private Sub YourDateFieldName_GotFocus()
     If Nz(Me.YourDateFieldName,"") = "" Then
      DoCmd.RunCommand acCmdShowDatePicker
     End If
    End Sub


    Replacing, of course, YourDateFieldName with the actual name of your Control...which, has been said, needs to be something other than Date...which is a Reserved Word.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 3
    Last Post: 07-20-2014, 08:56 PM
  2. Replies: 4
    Last Post: 04-03-2014, 08:03 AM
  3. not show the value zero
    By azhar2006 in forum Queries
    Replies: 2
    Last Post: 03-03-2014, 08:18 AM
  4. Replies: 1
    Last Post: 06-12-2011, 07:08 AM
  5. Show some or all
    By protean_being in forum Queries
    Replies: 1
    Last Post: 05-28-2008, 05:33 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