A
Abby Lee
I hard coded "TheYear" (the table) and "MonthPD" (a field) into my
script to make sure the query worked (it did)...so now I want to
replace an actual year (table) with varible which the next step is to
change from the web page.
Switched
"From AllExpenses2004" & _
With
"From " & TheYear & _
Dim ThePD
Dim TheYear
'Set ThePD = 0604
Set TheYear = "AllExpenses2004" '<-- Line 23
sSQL = "SELECT *" & _
" FROM " & TheYear & _
" WHERE MonthPD = '0604'"
set rs = Connect.Execute(sSQL)
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: '[string: "AllExpenses2004"]'
/eforms/reconcile/reconcile.asp, line 23
What did I do wrong?
script to make sure the query worked (it did)...so now I want to
replace an actual year (table) with varible which the next step is to
change from the web page.
Switched
"From AllExpenses2004" & _
With
"From " & TheYear & _
Dim ThePD
Dim TheYear
'Set ThePD = 0604
Set TheYear = "AllExpenses2004" '<-- Line 23
sSQL = "SELECT *" & _
" FROM " & TheYear & _
" WHERE MonthPD = '0604'"
set rs = Connect.Execute(sSQL)
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: '[string: "AllExpenses2004"]'
/eforms/reconcile/reconcile.asp, line 23
What did I do wrong?