Results 1 to 9 of 9
  1. #1
    smckenna is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2014
    Posts
    7

    Date Picker for running a Query

    All,



    I am using Access 2007. I have created a form where employees fill out the tasks they have completed and how much time has been allocated to that task. I have created a button on the form that runs a query so that they can see how much time they allocated for that day. At this point, they need to manually type in the date "2/26/2015" in order to run the query. I would instead like to have a date picker pop up so they do not need to manually input the date to run the query. How do I go about this?

    Again, I have a form that the users fill out, they then run a query for a specific date to see total time allocated. I dont want them to type in the date manually to run the query, I would like a date picker to be used. Can anybody help?

    Bests,
    Sean

  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,770
    Cannot invoke date picker in query. This is a feature of textbox on form. Query should reference textbox as parameter.
    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
    smckenna is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2014
    Posts
    7
    How do I reference the textbox in the form?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    [Forms]!formname!textboxname
    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.

  5. #5
    smckenna is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2014
    Posts
    7
    Thanks. So i will never be able to utilize the date picker for selecting a date to reference info from my form? i will always have to manually enter a date?

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    ?? The date picker is available to textbox on form.
    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.

  7. #7
    reentry is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2015
    Posts
    9
    June7 has completely right, i think u misunderstand him.
    He trys to say that u have to referer a textbox (which has a datepicker) to your query.

    U have a Form with the textbox (name = txtDate).

    Now u can make a query and instead of writing the date u refer to the text box example

    Code:
    Dim Sql as string
    sql = "Select * From tblxyz WHERE columnDate =  " & Me.txtDate
    As u can see after columeDate i refer to an open form with the Textbox named txtDate which has a datepicker.

  8. #8
    smckenna is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2014
    Posts
    7



    Sorry if i am confusing you.. maybe calling the calendar "date picker" is a problem.. i just assumed it was one and the same. Essentially, when i run my query, I want the start date parameter to have a calender button that the individual can select from instead of typing the date in manually. Is this possible? I want them to be able to run a query that shows how many hours they have completed for the day, but they would prefer to not have to type in a date.

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Comments still apply.

    Queries cannot have buttons and textboxes and therefore no calendar.

    Use a form.
    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. Running a query from a previous date
    By combine10 in forum Queries
    Replies: 2
    Last Post: 12-08-2014, 04:01 PM
  2. Show Date Picker on Load and Verifying Date
    By Markb384 in forum Forms
    Replies: 4
    Last Post: 03-04-2014, 07:44 AM
  3. Date criteria using between and form date picker
    By killermonkey in forum Queries
    Replies: 3
    Last Post: 03-21-2013, 12:44 PM
  4. Running Sum by Date criteria in a query
    By inno in forum Access
    Replies: 6
    Last Post: 11-08-2012, 12:33 AM
  5. Weird Date Picker Query Problem
    By Tim777 in forum Queries
    Replies: 11
    Last Post: 03-30-2012, 04:18 PM

Tags for this Thread

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