Results 1 to 10 of 10

Pass Input Box VBA Variable to SQL Query

Threaded View

  1. #1
    Registered User
    Join Date
    07-15-2010
    Location
    Omaha, Nebraska
    MS-Off Ver
    Excel 2007
    Posts
    32

    Pass Input Box VBA Variable to SQL Query

    Hello,

    I need to prompt the user for a date and then send it to the SQL query I have running in my 2007 Excel VBA. I am using Windows Server 2000 if that makes a difference. I know I can use in input box to get the date from the user and assign it to a variable in VB. My issue is how do I then get it into my SQL script? The script works great now with a date hard coded in. It looks in the tables with 4 joins and gets all the data as I need it.

    I would also like to total the figures after I am done. I am struggling with that as I can do it with a macro but I want the report to be done with one push of the button for the user. All I am returning is 2 fields from SQL. An invoice number and a Tax. It can be anywhere from 25 to 125 entries each day. I am willing to total all 125 rows each day if I can't select what is there.

    Thanks in Advance for any help.

    Charlie
    Last edited by Zoomer36; 09-15-2011 at 11:33 AM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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