Results 1 to 4 of 4
  1. #1
    angie is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Dec 2013
    Posts
    232

    calendar pop up to close

    I have acommand button that has the following on click


    Private SubCommand213_Click()
    Me.ServiceDate.Value= ""
    Me.Employees.Value= ""
    DoCmd.Requery
    End Sub

    The servicedatefield has a date picker with the follow two events.

    Private SubServiceDate_Change()
    DoCmd.Requery
    End sub

    Private SubServiceDate_GotFocus()
    RunCommandacCmdShowDatePicker
    End Sub

    When I clickthe command button it will clear the date from the servicedate but the datepicker calendar will pop up to choose a date. I would like the calendar not to open when this command is clicked.

    Thanks Angie

  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
    53,646
    Tried to replicate issue and can't. As soon as I go to click the button the DatePicker closes. However, have to click twice to activate the button if focus is on the DatePicker popup.

    Why do you need to Requery just for a data edit?
    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
    angie is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Dec 2013
    Posts
    232
    I have a combo box that filters the form by employee name. so I have to close the date picker so I can choose employee,

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    I usually find the date picker more annoying than helpful. I set up textboxes for date entry with an input mask (99/99/"20"00;0) and the date picker does not activate.
    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.

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

Similar Threads

  1. Replies: 4
    Last Post: 05-30-2016, 10:53 AM
  2. Replies: 5
    Last Post: 09-01-2014, 12:11 PM
  3. Close Dialog Box instead of Close App
    By ccchan in forum Access
    Replies: 4
    Last Post: 03-19-2014, 08:34 AM
  4. Replies: 4
    Last Post: 01-31-2014, 11:47 AM
  5. Replies: 2
    Last Post: 06-20-2011, 03:10 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