John Baker
Registered User.
- Local time
- Today, 17:58
- Joined
- Apr 13, 2005
- Messages
- 35
Hi All -
Looking for help with debugging an SQL string. I am trying to open a recordset using the following declarations and statements:
Dim db as Database
Dim rs as DAO.Recordset
Dim strBU as String
Dim strCustomerType as String
Dim strSQL as String
strSQL = "SELECT BU, CUSTOMER_TYPE, NUMBERPRGN, ELAPSED " & _
"FROM qry_ims_local " & _
"WHERE qry_ims_local.BU = " & strBU & " " & _
"AND qry_ims_local.CUSTOMER.TYPE = " & strCustomerType
Set rs=db.OpenRecorset(strSQL)
When I try to execute this code, I get a run time error '3061' - Too few parameters. Expected 2.
The query (qry_ims_local) does not have any parameters associated with it. I'm stumped. Any help would be appreciated.
Thanks,
John
Looking for help with debugging an SQL string. I am trying to open a recordset using the following declarations and statements:
Dim db as Database
Dim rs as DAO.Recordset
Dim strBU as String
Dim strCustomerType as String
Dim strSQL as String
strSQL = "SELECT BU, CUSTOMER_TYPE, NUMBERPRGN, ELAPSED " & _
"FROM qry_ims_local " & _
"WHERE qry_ims_local.BU = " & strBU & " " & _
"AND qry_ims_local.CUSTOMER.TYPE = " & strCustomerType
Set rs=db.OpenRecorset(strSQL)
When I try to execute this code, I get a run time error '3061' - Too few parameters. Expected 2.
The query (qry_ims_local) does not have any parameters associated with it. I'm stumped. Any help would be appreciated.
Thanks,
John