Results 1 to 4 of 4

Thread: query dates

  1. #1
    Join Date
    Apr 2017
    Posts
    1

    Unanswered: query dates

    I have 2 columns with 2 different dates. What I want to do is run a query that only shows records that have 2 dates that are in different months. I havent used Access in awhile so im not sure how to do this.Click image for larger version. 

Name:	upload.PNG 
Views:	4 
Size:	86.9 KB 
ID:	17327

    I tried attaching my sample database but im getting an error.

  2. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    629
    Provided Answers: 32
    make a form. on it put the 2 text boxes for the dates.
    txtStartDate
    txtEndDate

    the query will look at this to run the query:
    select * from table where [myDate] between forms!myForm!txtStartDate and forms!myForm!txtEndDate


    the error sounds like a corrupted db.

  3. #3
    weejas is offline Grumpy old man (training)
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    1,101
    Provided Answers: 17
    The error occurred because you can't upload Access databases directly to the forum. You need to zip it first.
    10% of magic is knowing something that no-one else does. The rest is misdirection.
    Beers earned: 2

  4. #4
    Join Date
    Apr 2017
    Posts
    10

    Query Dates

    "I have 2 columns with 2 different dates. What I want to do is run a query that only shows records that have 2 dates that are in different months...."


    Query Criteria: Month([YourDate1]) <> Month([YourDate2])

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
  •