Unable to Insert Parameter while using Excel as DB

Hi all,

I’m trying to dynamically assign values while using excel as DB

Error: Run query: ERROR [07002] [Microsoft][ODBC Excel Driver] Too few parameters. Expected 2.

Command I’m Giving

"SELECT SUM(PEJAMT) AS SUMTOTAL FROM [Query$A6:Z] WHERE [PEACCM] = @PEACCM AND [PEACCD] = @PEACCD "

Thanks

@ch460960

check the thread

It’s clear in that thread, he is not able to pass parameter either rather he passing value directly.

Hi @ch460960

Try this

"SELECT SUM(PEJAMT) AS SUMTOTAL FROM [Query$A6:Z] WHERE [PEACCM] = '" & yourPEACCMValue & "' AND [PEACCD] = '" & yourPEACCDValue & "'"

Hi @lrtetala ,

Thanks it works… mention in that Thread what @Krishna_Raj posted earlier. Is there any way I can pass parameter? What is the use of parameter property then?

Thanks