...have to end up doing. Was hoping I could get the correct sql syntax for weekday. I'll search teradata forums. Many thanks for your help! :)
**My logic basically takes the date the user enters (today's date is the default) and finds the most recent COMPLETED fiscal week (our banners have a...
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...
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...
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...
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.
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!
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...
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...
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...
...Database] A character string failed conversion to a numeric value. (#-3535)
Can someone please help? I'm at my wit's end. Thanks! :)
SELECT
*
FROM
invoice_detail
WHERE receipt_date = '" & Format$([Forms]![TEST_Export Excel files]![txtEnterDate], "yyyy-mm-dd") & "'
--These all work...
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...
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...
Nope you assume too much Skip
It's not a table - the nVision Excel layout I've created uses a query that brings this data into my report...it's a account reconciliation report for our accountants - they want each account's data in one tab. Much more efficient to bring it all in in one query...
I've searched the forums and elsewhere but can't locate an answer to my specific issue.
Here's what I'm trying to do in Excel...I'm fairly new at VB code though :(
I have one tab full of journal line data on roughly 20 different g/l accounts (more to be added later) starting in row 8, column...
You guys are awesome! Thanks so much!
I tried the brinkster method but it errored out - I used the method missinglinq suggested above and it works like a dream!! THANK YOU!!
Happy Camper
:)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.