A family of Microsoft relational database management systems designed for ease of use.
Can you run the GBO query directly without a problem? Are you sure it is the SET rs line throwing the error? What does your DIM rs statement look like?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi there,
I am having issues with the bolded line of the following code in that I get a 3061 error: "Too few parameters. Expected 1." The following code works fine where I am pulling data from a table, but not from any queries. Can anyone see the problem with this?
Set db = CurrentDb
**Set rs = db.OpenRecordset("GBO", dbOpenSnapshot)**
With rs
If .RecordCount <> 0 Then
Do While Not .EOF
sDataArray = sDataArray & " {ClientID: """ & ![Client ID] & """, Appointmentdate: """ & ![Appointment date] & """, GoalProgress1: """ & ![Goal progress 1] & """}," & vbCrLf
.MoveNext
Loop
End If
.Close
End With
Set rs = Nothing
Set db = Nothing
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Can you run the GBO query directly without a problem? Are you sure it is the SET rs line throwing the error? What does your DIM rs statement look like?
Hi, Thank you for your response. Unfortunately that does not make a difference.
Try "SELECT * FROM GBO"
Does that make any difference?
Hi HansV,
Thank you for your response - no the query does not display a parameter prompt when opened directly, and it does not refer to a control on a form.
Does the GBO query display a parameter prompt when opened directly? Or does it refer to a control on a form?