davefwelch
David
- Local time
- Today, 13:36
- Joined
- Jan 4, 2005
- Messages
- 47
I've tried several different manners to get this to work, but keep getting the same error when the event is triggered (i.e., the code is run):
RunTime Error '3061':
Too few parameters. Expected 1.
I know this is happening because I'm not properly filtering my recordset, because if I instead alter the filter built into the query to not rely on the value of the form field, it works like a charm. Here's the code I'm using currently:
I just tried adding .Value to the cmbPWSID criteria, but keep getting the same error. I've even tried inserting a MsgBox into the code, to ensure that Me.cmbPWSID is returning a value that would cause the recordset to have records, and it surely does! Can anyone tell me what the heck is going on?
Alternately, I tried creating a query based on the table PWSIDmorGroups, and adding into that query a criteria based on the value of the combo box in the form, and still get the same error! HELLLLLP please
RunTime Error '3061':
Too few parameters. Expected 1.
I know this is happening because I'm not properly filtering my recordset, because if I instead alter the filter built into the query to not rely on the value of the form field, it works like a charm. Here's the code I'm using currently:
Code:
Set rs = db.OpenRecordset("Select * from PWSIDmorGroups WHERE [PWSID] = " & Me.cmbPWSID.Value)
I just tried adding .Value to the cmbPWSID criteria, but keep getting the same error. I've even tried inserting a MsgBox into the code, to ensure that Me.cmbPWSID is returning a value that would cause the recordset to have records, and it surely does! Can anyone tell me what the heck is going on?
Alternately, I tried creating a query based on the table PWSIDmorGroups, and adding into that query a criteria based on the value of the combo box in the form, and still get the same error! HELLLLLP please