|
-
Run-Time Error 3061
Can anyone teel me why the following code generates the run-time error 3061.
"Too few parameters. Expected one."
This error is generated every time I try to execute the query in VB6.
No other errors are generated.
Private Sub cmdSelectCAR_Click()
Dim dbsCA2000 As Database
Dim strSQLSelectCAR As String
Dim qdfSelectCAR As QueryDef
Dim strParam As String
strParm = "PARAMETERS [Enter CAR Number] TEXT; "
strSQLSelectCAR = "INSERT INTO Temp ( [CAR Number], Assignee, [Date Issued],
[Date Due], [Date Closed], [Reject Tag Number], Customer, [Part Number],
[Shop Order Number], [Quantity Rejected], [CAR Received], [CA Approved By],
[Effective Date], [Follow-Up Req'd], Nonconformity, [Root Cause], [Corrective
Action], [Follow-Up Action], Notes )" _
& "SELECT [Corrective Action Request].[CAR
Number], [Corrective Action Request].Assignee, [Corrective Action Request].[Date
Issued], [Corrective Action Request].[Date Due], [Corrective Action Request].[Date
Closed], [Corrective Action Request].[Reject Tag Number], [Corrective Action
Request].Customer, [Corrective Action Request].[Part Number], [Corrective
Action Request].[Shop Order Number], [Corrective Action Request].[Quantity
Rejected], [Corrective Action Request].[CAR Received], [Corrective Action
Request].[CA Approved By], [Corrective Action Request].[Effective Date],
[Corrective Action Request].[Follow-Up Req'd], [Corrective Action Request].Nonconformity,
[Corrective Action Request].[Root Cause], [Corrective Action Request].[Corrective
Action], [Corrective Action Request].[Follow-Up Action], [Corrective Action
Request].[Notes]" _
& "From [Corrective Action Request]" _
& "WHERE ((([Corrective Action Request].[CAR Number])=[Enter CAR Number]));"
Set dbsCA2000 = OpenDatabase("c:\vb samples\ca2000\CA2000.mdb")
Set qdfDeleteTemp = dbsCA2000.CreateQueryDef("", strSQLSelectCAR)
dbsCA2000.Execute strSQLSelectCAR
End Sub
Thank you in advance.
Steven A. Kocon
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks