Results 1 to 6 of 6
  1. #1
    iProRyan is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Dec 2011
    Location
    England, United Kingdom
    Posts
    44

    Daily Job List Query - Current Date Issue

    Hi Guys,



    Got another problem with a query, this time the query will be used to produce a report of all the jobs with the current date in the JobDate field, but having some problems filtering this in the query. I have added all the fields from tblJobs to the query and tried all sorts in the criteria for the JobDate field. The dates are selected from Calendar Picker and stored in the format DD/MM/YYYY can anybody help me?

    The SQL for the query is:

    SELECT tblJobs.[JobID], tblJobs.[CustomerID], tblJobs.[JobType], tblJobs.[JobDate], tblJobs.[JobStartTime], tblJobs.[JobEndTime], tblJobs.[JobNotes], tblJobs.[Completed], tblJobs.[Paid]
    FROM tblJobs
    WHERE (((tblJobs.[JobID])=Date()));

    Any thoughts are appreciated!

    Ryan

  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
    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
    iProRyan is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Dec 2011
    Location
    England, United Kingdom
    Posts
    44
    I have read through this, but don't see exactly how this will help me, because I am not selecting data, I am search it, unless you can explain?

  4. #4
    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
    Ryan,

    SELECT tblJobs.[JobID], tblJobs.[CustomerID], tblJobs.[JobType], tblJobs.[JobDate], tblJobs.[JobStartTime], tblJobs.[JobEndTime], tblJobs.[JobNotes], tblJobs.[Completed], tblJobs.[Paid]
    FROM tblJobs
    WHERE (((tblJobs.[JobID])=Date()));

    You have JobId =Date()

    try JobDate =Date()

  5. #5
    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 article discusses use of non-MS standard date values and the issues that can result. You need to be aware of that because you said your date is ddmmyyyy instead of mmddyyyy. In reality, Access stores dates as a double number that represents mmddyyyy, regardless of local display settings.
    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.

  6. #6
    iProRyan is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Dec 2011
    Location
    England, United Kingdom
    Posts
    44
    Thank you orange! Luckily someone is on the ball haha! How stupid, apologies for the silliest post ever! I'll try to be less clumsy in future, works perfectly now haha!

    Thank you June7 dates are such an inconvenience with different formats especially in SQL servers haha!

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

Similar Threads

  1. Making a daily list of people from a database...
    By greentiger in forum Access
    Replies: 5
    Last Post: 02-16-2013, 10:02 AM
  2. Replies: 25
    Last Post: 11-16-2012, 12:47 PM
  3. Using Current Date in a Query
    By littlewing in forum Queries
    Replies: 6
    Last Post: 04-28-2012, 12:57 PM
  4. query criteria for current date
    By Paul-NY in forum Queries
    Replies: 5
    Last Post: 07-05-2011, 02:21 PM
  5. Daily reports from date range tables?
    By sparker in forum Database Design
    Replies: 0
    Last Post: 03-29-2010, 11:07 AM

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