+ Reply to Thread
Results 1 to 2 of 2

Query Access based on date

  1. #1
    Registered User
    Join Date
    11-07-2006
    Posts
    12

    Query Access based on date

    Every day, I run queries in Access and paste them into Excel. I have been working on a macro to use Microsoft Query to directly import the data using a macro. However, I'm not sure how to introduce a variable condition, for lack of a better way to put it.

    Here's an example of what I've been working on:
    Please Login or Register  to view this content.
    But rather than "DataDate={ts '2006-11-16 00:00:00'})"" I would like some way to search for records for a specific date. If it matters, I am always look for records from yesterday. If there is a way to introduce a variable, say from a cell in my spreadsheet, that would be great.

    One last thing, though I can work around this detail... I would like to search by date, but I'd prefer not to get the dates back in the data (as they'll all be the same anyway). Can you have a field as a condition without making it part of the results from the query ?

    Thank you in advance.

  2. #2
    Registered User
    Join Date
    11-07-2006
    Posts
    12
    I don't know if it matters, but my raw data does not include a date. We use a Form to supply a date as the data is being input into the database and the same form for queries.

    So my normal query criteria looks like this:
    [Forms]![Enter Data Date]![DataDate] (in Access, I can't use this with Excel)

    However, I am making new queries in Access for use in this import process from Excel. I just need to figure out exactly how to do it =)
    Last edited by Kinesthesia; 11-17-2006 at 01:27 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1