Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22
  1. #16
    MFS is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235

    "To take a step back, why is it that you are writing calculated records to a new table?"
    "The general rule of thumb is to not write anything to a table which can be calculated on the fly."

    An Engineer is trying to pull data into an Excel spreadsheet, but the issue is that the data is in different tables of my database.
    So I wrote a query that would collect needed data from these tables and the query now sends that to one table which he can be linked to Excel.
    Probably not the best way of doing it, but the only way I new how.

  2. #17
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Just to add a thought I haven't noticed being addressed. I have had instances where Between didn't work if the higher value was placed first, so I always structure it with the lower value first. In this instance:

    Between Date()-6 And Date()

    I'm not saying it won't/can't work the other way, just that it can fail if reversed.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #18
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    An Engineer is trying to pull data into an Excel spreadsheet, but the issue is that the data is in different tables of my database.
    So I wrote a query that would collect needed data from these tables and the query now sends that to one table which he can be linked to Excel.
    Probably not the best way of doing it, but the only way I new how.
    Usually, anything you can use a Table for you can also use a Query for. So if you can link the Select Query to Excel, there may be no need to write it to a table (and that would help keep your database size down if you can avoid adding unnecessary tables and records).

    Just to add a thought I haven't noticed being addressed. I have had instances where Between didn't work if the higher value was placed first, so I always structure it with the lower value first. In this instance:

    Between Date()-6 And Date()

    I'm not saying it won't/can't work the other way, just that it can fail if reversed.
    Interesting. I thought of that myself, and tested that, but it seemed to work for me either way. Maybe it depends on which version of Access one is running...

  4. #19
    MFS is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235
    Quote Originally Posted by JoeM View Post
    Usually, anything you can use a Table for you can also use a Query for. So if you can link the Select Query to Excel, there may be no need to write it to a table (and that would help keep your database size down if you can avoid adding unnecessary tables and records)...
    I receive an error stating that it could not access the query due to someone having the database open. Is there a way around this?

  5. #20
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    If you have your Access database open at the same time you are trying to access the query in Excel, that may be problematic (just like two people trying to open the same Excel file). I would expect the same kind of behavior if you went the Table route also.
    You could explicitly export the Access Query to an Excel file. Then it is its own copy, no longer tied to the Access query and you would not have any conflicts.

  6. #21
    MFS is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235
    Thank You all for your help in solving.

    Speck

  7. #22
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You are welcome!

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 06-26-2015, 09:40 AM
  2. Replies: 5
    Last Post: 08-20-2014, 10:18 PM
  3. Replies: 1
    Last Post: 11-26-2013, 09:25 AM
  4. Replies: 3
    Last Post: 08-21-2012, 03:05 PM
  5. date criteria is not working
    By kwooten in forum Queries
    Replies: 6
    Last Post: 08-12-2011, 12:31 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