Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by ScorpioMCN

  1. ScorpioMCN

    Access pass-through query can't recognize form date...pls help

    True I know how to do it in Access VBA code but I have to be able to filter to only the dated records I need (as Invoice_Detail is a HUGE table) and so I need to know how to write it in SQL...unless I change my form and ask the user to input two dates for the date range (instead of one) -...
  2. ScorpioMCN

    Access pass-through query can't recognize form date...pls help

    SQL above only works if I take out this... DATEPART(w,'" & Format$([Forms]![TEST_Export Excel files]![txtEnterDate], "yyyy-mm-dd") & "') As WKDY I've reworked the sql to link in one of my Access tables (deal_items)...this runs without errors... Dim strSQL As String Dim strOldSQL As...
  3. ScorpioMCN

    Access pass-through query can't recognize form date...pls help

    Thanks D That isn't working for me though Dim strSQL As String Dim strOldSQL As String Dim strQueryName As String strQueryName = "edw_Invoice_Detail" strSQL = "SELECT receipt_date, PC_Item_Key, DATEPART(w,'" & Format$([Forms]![TEST_Export Excel files]![txtEnterDate], "yyyy-mm-dd") & "') As WKDY...
  4. ScorpioMCN

    Access pass-through query can't recognize form date...pls help

    Well of course I did - just now lol It works! (only after I changed "pstrQueryName" to "strQueryName" in that last line...must have been a typo?) without errors - I still need to tweak the sql to link in my Access tables - hopefully that will not be another roadblock. I also need to calculate...
  5. ScorpioMCN

    Access pass-through query can't recognize form date...pls help

    Got an error...when I ran the code, it highlighted "fChangeSQL" and says "Compile error: Sub or Function not defined
  6. ScorpioMCN

    Access pass-through query can't recognize form date...pls help

    dhookom - there seems to be a problem with the last line of code... strOldSQL = fChangeSQL(pstrQueryName As String, strSQL As String) Can you please advise? Thanks.
  7. ScorpioMCN

    Access pass-through query can't recognize form date...pls help

    You guys ROCK! - I'm going to try those methods when I get time and I'll get back to you on whether it works for me. Thanks again!
  8. ScorpioMCN

    Access pass-through query can't recognize form date...pls help

    Understood - so what I'm trying to do is not possible. So I'm fuzzy on how I use the vb code in my pass-through query...can you please explain in more detail how I'd work your code into my query? I really appreciate all the responses from you guys - you're the best!
  9. ScorpioMCN

    Access pass-through query can't recognize form date...pls help

    Are you sure??? As I read a few posts where people were passing parameters to a PT query and seemed to have had luck doing it...unless they were smokin something (??) Using a linked table is something I can do but our IT folks aren't going to like me doing that...AND it's going to be MUCH...
  10. ScorpioMCN

    Access pass-through query can't recognize form date...pls help

    Thanks Genomon - but that's not my issue - as I already have Teradata SQL Assistant on my pc - and I frequently use it to query the same table (and others) with no issues that I'm trying to in Access. I've also researched the Teradata forums and found nothing that helps my situation - in fact...
  11. ScorpioMCN

    Access pass-through query can't recognize form date...pls help

    lameid - that's why included those WHERE statements that did bring back results... All these work: --WHERE receipt_date = current_date --WHERE receipt_date = '2012-04-16' --WHERE receipt_date = 1120416 --WHERE receipt_date between 1120416 and 1120417 --WHERE receipt_date >= '2012-04-16' AND...
  12. ScorpioMCN

    Access pass-through query can't recognize form date...pls help

    Thanks guys for the feedback! I've tried 3 more formats...all failed :(: 1) WHERE receipt_date = CDate([Forms]![TEST_Export Excel files]![txtEnterDate]) Error was: ODBC-call failed. [Teradata][ODBC Teradata Driver][Teradata Database] Syntax error: expected something between '(' and the end...
  13. ScorpioMCN

    Access pass-through query can't recognize form date...pls help

    I've searched throughout this site and googled also and have not found any posts that resolves my issue. I have this sql in a pass-through query in Access 2010...I need the sql to use the date the user enters in the Access form...I get this error however: ODBC--call failed. [Teradata][ODBC...
  14. ScorpioMCN

    Need code to move data to new worksheets

    I have nothing yet - because as I said I'm new to VB - I have done macros somewhat before but nothing quite like this situation. I have tried to search for answers in books and online but nothing seems to fit what I'm needing. I think I spelled out pretty well what I need above - if someone...
  15. ScorpioMCN

    Need code to move data to new worksheets

    I appreciate your responses but with all due respect, you guys are off in left field - all I'm looking for is some VB code to move the data I've brought into my report for each account to a new worksheet. This is not that complicated of a request - I just don't know how to code it. I don't...

Part and Inventory Search

Back
Top