G
Guest
Hi,
I have a button which runs a query and copies the contents to Excel
eg:
strQuery = "MyQueryName"
objDB.Execute _
"SELECT * INTO [Excel 8.0;DATABASE=" & strExcelFile & _
"].[" & strWorksheet & "] FROM " & "[" & strQuery & "]"
objDB.Close
Now I have changed the Query to require a parameter to be passed to it.
Does anyone know the syntax I should use to incorporate this into my code?
E.G i tried:
strQuery = "MyQueryName(2)"
but I think i have the syntax for passing a parameter wrong
thanks for any help you can give!
I have a button which runs a query and copies the contents to Excel
eg:
strQuery = "MyQueryName"
objDB.Execute _
"SELECT * INTO [Excel 8.0;DATABASE=" & strExcelFile & _
"].[" & strWorksheet & "] FROM " & "[" & strQuery & "]"
objDB.Close
Now I have changed the Query to require a parameter to be passed to it.
Does anyone know the syntax I should use to incorporate this into my code?
E.G i tried:
strQuery = "MyQueryName(2)"
but I think i have the syntax for passing a parameter wrong
thanks for any help you can give!