> I have the following code looking up a record count, I am receiving
> the 3601 error code on open.
[quoted text clipped - 23 lines]
> End Sub
> ***********/
Do you mean error 3061, by any chance? That's "Too few parameters". I
don't know of any error 3601, so I'm going to guess you mean 3061. If
I'm right, then examine the value of strSql before you open the
recordset. Make sure that all of the field names are correctly spelled
and actually exist in the tables where your SQL thinks they are. Also
make sure that all text literals are enclosed in quotes. For example,
if SOP.EMP_ID is a text value, then you need to surround the embedded
value of p2 with quotes. Otherwise the database engine is going to
think it's a parameter, as it will for any name it doesn't recognize.

Signature
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
Stalin - 30 May 2007 04:27 GMT
On May 29, 9:57 pm, "Dirk Goldgar" <d...@NOdataSPAMgnostics.com>
wrote:
> Innews:1180483273.546747.67660@q66g2000hsg.googlegroups.com,
>
[quoted text clipped - 40 lines]
>
> (please reply to the newsgroup)
Little bit of dyslexia there, I did mean error 3061.
Thanks for the second pair of eyes on it, I should have noticed the
quotes missing myself.
Also thanks for the quick response to my post.
Best Regards,
Stalin
Stalin - 30 May 2007 05:03 GMT
> On May 29, 9:57 pm, "Dirk Goldgar" <d...@NOdataSPAMgnostics.com>
> wrote:
[quoted text clipped - 53 lines]
>
> Stalin
Sorry bad form, here is the corrected code, thanks again for all you
help.
strSql = "SELECT * FROM SOP WHERE SOP.STATUS = ""ACTIVE"" AND SOP." &
p1 & " = True AND SOP.SOP_ID Not In (SELECT SOP_ID FROM EMP_SOP WHERE
EMP_SOP.EMP_ID = """ & p2 & """)"