473,695 Members | 2,492 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

MLH
If this is what MySQL is set to...
SELECT DISTINCTROW qryVehiclesNown ers5.SerialNum,
qryVehiclesNown ers5.VDescr, qryVehiclesNown ers5.Owner,
qryVehiclesNown ers5.VehicleJob ID , tblVehicleJobs. Reclaimed,
tblVehicleJobs. VSaleID, tblVehicleJobs. ENF262Written FROM
qryVehiclesNown ers5 INNER JOIN tblVehicleJobs ON
qryVehiclesNown ers5.VehicleJob ID = tblVehicleJobs. VehicleJobID WHERE
(tblVehicleJobs .Reclaimed=No AND tblVehicleJobs. VSaleID Is Null AND
tblVehicleJobs. ENF262Written=T rue);

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

10 Set dbs = CurrentDb
20 Set rst = dbs.OpenRecords et(MySQL)

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

Is my query too complex?
Nov 13 '05 #1
11 3346

"MLH" <CR**@NorthStat e.net> schreef in bericht news:6p******** *************** *********@4ax.c om...
If this is what MySQL is set to...
SELECT DISTINCTROW qryVehiclesNown ers5.SerialNum,
qryVehiclesNown ers5.VDescr, qryVehiclesNown ers5.Owner,
qryVehiclesNown ers5.VehicleJob ID , tblVehicleJobs. Reclaimed,
tblVehicleJobs. VSaleID, tblVehicleJobs. ENF262Written FROM
qryVehiclesNown ers5 INNER JOIN tblVehicleJobs ON
qryVehiclesNown ers5.VehicleJob ID = tblVehicleJobs. VehicleJobID WHERE
(tblVehicleJobs .Reclaimed=No AND tblVehicleJobs. VSaleID Is Null AND
tblVehicleJobs. ENF262Written=T rue);

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

10 Set dbs = CurrentDb
20 Set rst = dbs.OpenRecords et(MySQL)

Error: The following unexpected error occurred in Sub Form_Open,
line #20, CBF on frmVehicleChoos erForm.
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
do the follwing

5 debug.Print MySql
10 Set dbs = CurrentDb
20 Set rst = dbs.OpenRecords et(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
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?
xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxx

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
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?
xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxx

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

"MLH" <CR**@NorthStat e.net> schreef in bericht news:jv******** *************** *********@4ax.c om...
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?
xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxx

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
MLH
Good thinking, Albert. I would have taken me another 2
weeks to figure that one out! The query that was embedded
in there (qryVehiclesNow ners5) 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.
xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xx

do the follwing

5 debug.Print MySql
10 Set dbs = CurrentDb
20 Set rst = dbs.OpenRecords et(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

"MLH" <CR**@NorthStat e.net> schreef in bericht news:gc******** *************** *********@4ax.c om...
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?
xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxx


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
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?
xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxx


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

"MLH" <CR**@NorthStat e.net> schreef in bericht news:lq******** *************** *********@4ax.c om...
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?
xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxx


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

Arno R
Nov 13 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2229
by: deko | last post by:
This sub pulls Outlook Appointments into a table. The problem is I want to limit the import to Location = Boston I'm not sure how to code that into the For... To loop - As it is now, I get the following error: Run-time error '3163': The field is too small to accept the amount of data you attempted to add. Try inserting less data.
2
1912
by: Susan Bricker | last post by:
Greetings Experts ... I have a routine that is invoked when a command button is clicked. The button is located in a form that is tied to a table of Project records. Each Project Record has 0 to many Task Records associated with it (in another table). I want to 'logically remove' the Project Record and all Task Records for the Project (by setting the field in each of those records to 'true'). Here is the problem ... in the routine I...
2
14872
by: lgo | last post by:
I have read several variations of this topic posted on this news group. However I was not able to find the answer for my problem. I am trying to build code (see below) to update a large single record using data from a temporary (editing) table with identical field structure. I iterate through the fields (some 50 of them) with a For Each - Next loop to update each field with the SQL statement. The updating works fine with numeric data type...
11
9843
by: MLH | last post by:
I copied the following code snippet from A97 HELP. Am getting an error at compile time suggesting there's a problem with the first line (compile error, user-defined type not defined). It is likely that I've left something out. Doesn't seem to like Dim dbs as Database - that's what's hi-lited after acknowledging the error. Can you see anything wrong with that syntax? Dim dbs As Database, rst As Recordset Dim rstEmployees As Recordset,...
9
5371
by: MLH | last post by:
A runtime error 13 (type mismatch) occurs running the following line: Set rst = dbs.OpenRecordset("tblMyTable", dbOpenTable) What would be the most likely place I would find the source of the error? The DAO code lines providing dependencies to this one are... Dim dbs As Database, rst as RecordSet Set dbs = CurrentDb
3
2427
by: jbsfe | last post by:
I have "Spilt" my database and the "lookup" and "seek" methods that previously worked, no longer do. I have learnd from reviewing the posts that the "lookup" and "Seek" methods cannot be used on linked tables and that you cannot set an "index" for a linked table. What I don't know how to do, is revise my code to complete the same tasks as it it did before I split the database. I'm sure the problem lies is this block of code: 'Define...
59
7503
by: Rico | last post by:
Hello, I have an application that I'm converting to Access 2003 and SQL Server 2005 Express. The application uses extensive use of DAO and the SEEK method on indexes. I'm having an issue when the recordset opens a table. When I write Set rst = db.OpenRecordset("MyTable",dbOpenTable, dbReadOnly) I get an error. I believe it's invalid operation or invalid parameter, I'm
1
2029
by: destr19 | last post by:
Dim cstsname As String Dim cstpc As String Dim rstresult As Recordset 'recordset to store output Dim mydatabase As Database 'Variable to store user entered surname Me.Text20.SetFocus cstsname = Text20.Text
4
2332
by: Constantine AI | last post by:
I am trying to code a SAVE button which will automatically change numerous rows of data within a table. I have created the appropriate query and checked it works when the form is open. However the coding doesn't work. I am not very good using the whole rst! syntax. I have attempted to get the code right and checked online for similar solutions however i have come up blank. The is as follows; Dim db As Database Dim rst As Recordset ...
0
8586
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9004
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8864
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8838
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6506
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5842
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4351
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3025
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2289
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.