By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,660 Members | 1,579 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,660 IT Pros & Developers. It's quick & easy.

A97: Set dbs = CurrentDb Set rst = dbs.OpenRecordset(MySQL) 2nd line yields error "Too few parms"

P: n/a
MLH
If this is what MySQL is set to...
SELECT DISTINCTROW qryVehiclesNowners5.SerialNum,
qryVehiclesNowners5.VDescr, qryVehiclesNowners5.Owner,
qryVehiclesNowners5.VehicleJobID , tblVehicleJobs.Reclaimed,
tblVehicleJobs.VSaleID, tblVehicleJobs.ENF262Written FROM
qryVehiclesNowners5 INNER JOIN tblVehicleJobs ON
qryVehiclesNowners5.VehicleJobID = tblVehicleJobs.VehicleJobID WHERE
(tblVehicleJobs.Reclaimed=No AND tblVehicleJobs.VSaleID Is Null AND
tblVehicleJobs.ENF262Written=True);

What exactly would cause the following lines to cause the following
error when run?

10 Set dbs = CurrentDb
20 Set rst = dbs.OpenRecordset(MySQL)

Error: The following unexpected error occurred in Sub Form_Open,
line #20, CBF on frmVehicleChooserForm.
3061: "Too few parameters. Expected 5."

Is my query too complex?
Nov 13 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a

"MLH" <CR**@NorthState.net> schreef in bericht news:6p********************************@4ax.com...
If this is what MySQL is set to...
SELECT DISTINCTROW qryVehiclesNowners5.SerialNum,
qryVehiclesNowners5.VDescr, qryVehiclesNowners5.Owner,
qryVehiclesNowners5.VehicleJobID , tblVehicleJobs.Reclaimed,
tblVehicleJobs.VSaleID, tblVehicleJobs.ENF262Written FROM
qryVehiclesNowners5 INNER JOIN tblVehicleJobs ON
qryVehiclesNowners5.VehicleJobID = tblVehicleJobs.VehicleJobID WHERE
(tblVehicleJobs.Reclaimed=No AND tblVehicleJobs.VSaleID Is Null AND
tblVehicleJobs.ENF262Written=True);

What exactly would cause the following lines to cause the following
error when run?

10 Set dbs = CurrentDb
20 Set rst = dbs.OpenRecordset(MySQL)

Error: The following unexpected error occurred in Sub Form_Open,
line #20, CBF on frmVehicleChooserForm.
3061: "Too few parameters. Expected 5."

Is my query too complex?


When did you get this error? 2 minutes ago?
If you do a Google search in cdma for "too few parameters" you will get approx. 1,280 answers

Arno R

Nov 13 '05 #2

P: n/a
do the follwing

5 debug.Print MySql
10 Set dbs = CurrentDb
20 Set rst = dbs.OpenRecordset(MySQL)


When you get the error, note how the sql is in the debug window. Take that
sql, and cut/paste it into a new blank query.

does it run?
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
http://www.members.shaw.ca/AlbertKallal
Nov 13 '05 #3

P: n/a
MLH
Sorry, Arno, but most of those hits on google seem to generalize
about references to controls on a form. My SQL has none of that
so I am still in the dark as much as I was 2 minutes ago, as you
mentioned. Do you know what to do in a case like that. I'm not
asking you to do a google search, as I am perfectly capable of
doing that. I'm asking you if you know the answer? Do you?
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

When did you get this error? 2 minutes ago?
If you do a Google search in cdma for "too few parameters" you will get approx. 1,280 answers

Arno R


Nov 13 '05 #4

P: n/a
MLH
Arno, just out of curiousity. Do you see any parameters in that query?
Cause I don't. For that reason, I have no reason to suspect that
parameters are involved. I could be wrong. There are no bangs in
the syntax. That's the reason for the OP. I'm sure someone knows
the answer in this NG. I think its fair to assume that if it stumps me
and it is stumping you - it is probably stumping someone else out
there right now.

The fact is, I first encountered this error about 2 wks ago. I'm not
sure that it matters that it was 2 weeks ago or 2 minutes ago. I
believe you meant that if I do a Google search in cdma for "too few
parameters" you will get approx. 1,280 documents to read - not
1,280 answers. Right?
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

When did you get this error? 2 minutes ago?
If you do a Google search in cdma for "too few parameters" you will get approx. 1,280 answers

Arno R


Nov 13 '05 #5

P: n/a

"MLH" <CR**@NorthState.net> schreef in bericht news:jv********************************@4ax.com...
Sorry, Arno, but most of those hits on google seem to generalize
about references to controls on a form. My SQL has none of that
so I am still in the dark as much as I was 2 minutes ago, as you
mentioned. Do you know what to do in a case like that. I'm not
asking you to do a google search, as I am perfectly capable of
doing that. I'm asking you if you know the answer? Do you?
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

When did you get this error? 2 minutes ago?
If you do a Google search in cdma for "too few parameters" you will get approx. 1,280 answers

Arno R


I think I was too quick with my response to you.
I expected a lot of field references and/or parameters in your SQL.
Since I don't see that, I would guess your SQL is not correct (Jet has trouble finding your missspelled fields?)

Did you follow Albert's advice?

Arno R

Nov 13 '05 #6

P: n/a
MLH
Good thinking, Albert. I would have taken me another 2
weeks to figure that one out! The query that was embedded
in there (qryVehiclesNowners5) was a QBF and I had completely
forgotten about it. The second I pasted it in there & ran it - just
like you said - I knew instantly! I guess that's the difference
between MVP's and hackers like me. I should-a-caught that
one, really. But I've been puzzling over it long enough.

Many Thx.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

do the follwing

5 debug.Print MySql
10 Set dbs = CurrentDb
20 Set rst = dbs.OpenRecordset(MySQL)


When you get the error, note how the sql is in the debug window. Take that
sql, and cut/paste it into a new blank query.

does it run?


Nov 13 '05 #7

P: n/a

"MLH" <CR**@NorthState.net> schreef in bericht news:gc********************************@4ax.com...
Arno, just out of curiousity. Do you see any parameters in that query?
Cause I don't. For that reason, I have no reason to suspect that
parameters are involved. I could be wrong. There are no bangs in
the syntax. That's the reason for the OP. I'm sure someone knows
the answer in this NG. I think its fair to assume that if it stumps me
and it is stumping you - it is probably stumping someone else out
there right now.

The fact is, I first encountered this error about 2 wks ago. I'm not
sure that it matters that it was 2 weeks ago or 2 minutes ago. I
believe you meant that if I do a Google search in cdma for "too few
parameters" you will get approx. 1,280 documents to read - not
1,280 answers. Right?
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


The second and also the third hit in Google for "Too few parameters" would have given you the very same answer that Albert gave ...
You don't have to read ALL hits always ;-)

Arno R
Nov 13 '05 #8

P: n/a
MLH
True enough. I google a fair amount - although, probably not as
much as some. I'm a lower-tech access user than most in this NG
and quite frankly, I don't understand much of what I read when
googling. BTW, help me out here - I'm not sure what is meant by
CDMA??? When I go to google, I generally use this URL...
http://groups.google.com/group/comp.databases.ms-access
I don't know how to get to CDMA?
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxx


The second and also the third hit in Google for "Too few parameters" would have given you the very same answer that Albert gave ...
You don't have to read ALL hits always ;-)

Arno R


Nov 13 '05 #9

P: n/a

"MLH" <CR**@NorthState.net> schreef in bericht news:lq********************************@4ax.com...
True enough. I google a fair amount - although, probably not as
much as some. I'm a lower-tech access user than most in this NG
and quite frankly, I don't understand much of what I read when
googling. BTW, help me out here - I'm not sure what is meant by
CDMA??? When I go to google, I generally use this URL...
http://groups.google.com/group/comp.databases.ms-access
I don't know how to get to CDMA?
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxx


Your URL is alright.
cdma is where you post a very lot of questions ... ;-)

Arno R
Nov 13 '05 #10

P: n/a
Bri


MLH wrote:
If this is what MySQL is set to...
SELECT DISTINCTROW qryVehiclesNowners5.SerialNum,
qryVehiclesNowners5.VDescr, qryVehiclesNowners5.Owner,
qryVehiclesNowners5.VehicleJobID , tblVehicleJobs.Reclaimed,
tblVehicleJobs.VSaleID, tblVehicleJobs.ENF262Written FROM
qryVehiclesNowners5 INNER JOIN tblVehicleJobs ON
qryVehiclesNowners5.VehicleJobID = tblVehicleJobs.VehicleJobID WHERE
(tblVehicleJobs.Reclaimed=No AND tblVehicleJobs.VSaleID Is Null AND
tblVehicleJobs.ENF262Written=True);

What exactly would cause the following lines to cause the following
error when run?

10 Set dbs = CurrentDb
20 Set rst = dbs.OpenRecordset(MySQL)

Error: The following unexpected error occurred in Sub Form_Open,
line #20, CBF on frmVehicleChooserForm.
3061: "Too few parameters. Expected 5."

Is my query too complex?


I see in another post that you have solved this problem, but you didn't
really clarify why you had the problem. If I could guess I would say
that since your SQL above has a query in the FROM that it is THAT query
that has the parameters that can't be found. IS that what happened? Or
was it a different issue?

--
Bri

Nov 13 '05 #11

P: n/a
MLH
Your suspicion is correct. That's EXACTLY what happened. I consider
it an oversight. Just wasn't clear to me at the time of the error
notice. Thx.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I see in another post that you have solved this problem, but you didn't
really clarify why you had the problem. If I could guess I would say
that since your SQL above has a query in the FROM that it is THAT query
that has the parameters that can't be found. IS that what happened? Or
was it a different issue?


Nov 13 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.