Results 1 to 10 of 10
  1. #1
    malacqua is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2012
    Posts
    11

    Access 2007 Query formula

    how can I write a quary to pull vacation dates between certain dates.

    In the query I have these fields

    Employee Name
    Title
    Department
    Manager
    Exec Manager
    Requested Date (these are date fields)
    From (these are date fields)
    To(these are date fields)
    Approved





    I tried this to no avail
    [OrdersAfterDate]![OrderDate]

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Try:

    SELECT * FROM tablename WHERE [From] BETWEEN [enter start date] AND [enter end date] OR [To] BETWEEN [enter start date] AND [enter end date];
    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
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Be aware that "FROM" and "TO" are Access reserved words and shouldn't be used as object names. Plus "FROM" and "TO" aren't very descriptive.

    Problem names and reserved words in Access
    See: http://allenbrowne.com/AppIssueBadWord.html

  4. #4
    malacqua is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2012
    Posts
    11
    GREAT Thank you so much

  5. #5
    malacqua is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2012
    Posts
    11
    Steve I am trying to find the thread tools to mark this solved...

  6. #6
    malacqua is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2012
    Posts
    11
    Super Moderate Thank you it work wonderfully

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Above the first post, the dropdown called 'Thread Tools'.
    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.

  8. #8
    malacqua is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2012
    Posts
    11
    Thank you so much it worked great.....no if I can find where you marked it solved it would be even greater Mary Ann

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    It should be under Thread Tools. But I don't see it for this thread. I do on another thread. Odd.
    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.

  10. #10
    malacqua is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2012
    Posts
    11
    OK so you know that it work and I'll be back again Mary Ann

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

Similar Threads

  1. Excel Formula into Access Query
    By dr4ke in forum Queries
    Replies: 7
    Last Post: 06-25-2012, 06:46 AM
  2. Replies: 2
    Last Post: 06-18-2011, 09:55 AM
  3. Replies: 0
    Last Post: 06-03-2011, 09:03 AM
  4. access query formula
    By simpleman in forum Queries
    Replies: 6
    Last Post: 11-26-2009, 09:13 AM
  5. Replies: 0
    Last Post: 09-03-2009, 01:58 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