+ Reply to Thread
Results 1 to 3 of 3

VBA to modify SQL Query inside of Access

  1. #1
    Forum Contributor
    Join Date
    07-07-2014
    Location
    ericbartha.com
    MS-Off Ver
    2016 Professional
    Posts
    126

    VBA to modify SQL Query inside of Access

    Good afternoon everyone,

    I am having trouble finding a solution to the current problem I am having. I have an Excel workbook "Weekly Metrics Admin Tool" that has two buttons. The first button opens a database that houses a bunch of queries that generate the weekly metrics reports. However, when I click it, it targets ALL the data in the tables and not just last week, what I am reporting on. I know I can go in and use a LIKE "Week 49", but I do not want to have to change it every week.

    My initial thought is to have a cell in the workbook with the admin buttons where I can quickly enter the week I want it too target but I need help with the VBA to have it reference that cell and modify the query!

    Any help would be greatly appreciated!

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: VBA to modify SQL Query inside of Access

    So does the Access query return the results to your Excel workbook or just open the database for the queries to run in there?
    If someone has helped you then please add to their Reputation

  3. #3
    Forum Contributor
    Join Date
    07-07-2014
    Location
    ericbartha.com
    MS-Off Ver
    2016 Professional
    Posts
    126

    Re: VBA to modify SQL Query inside of Access

    The macro opens the Access database and runs the query inside of there.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How can I modify the arguments inside a sum function?
    By NephrenKa in forum Excel General
    Replies: 2
    Last Post: 10-28-2014, 02:05 PM
  2. Vlookup inside Access
    By djblois1 in forum Excel General
    Replies: 5
    Last Post: 03-08-2012, 01:33 PM
  3. Importing Access query into Excel:Microsoft Query
    By ge0rge in forum Excel General
    Replies: 3
    Last Post: 04-02-2009, 10:51 AM
  4. [SOLVED] Access query to excel and back to access updated??
    By jwr in forum Excel General
    Replies: 0
    Last Post: 03-19-2006, 08:50 PM
  5. Database Query-a query that reads data from MS Access
    By Osmar Mateus in forum Excel General
    Replies: 4
    Last Post: 01-29-2006, 04:10 PM

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