PC Review


Reply
Thread Tools Rate Thread

3061 Error when doing everything that works in another module.

 
 
=?Utf-8?B?QW5keSBEb3JwaA==?=
Guest
Posts: n/a
 
      14th Jun 2005
I reference the proper DAO Library.
I included Dim rs as DAO.RecorSet.
I created the SQL in native Access.
The Query works in native Access.

The command lines are:

selector = SELECT Vendor.V_Name FROM Vendor WHERE (((Vendor.[V_ ID])=39));

Set rs = CurrentDb.OpenRecordset(selector)

I am still receiving a 3061 error. What am I doing wrong? If nothing is
wrong with the code, how do I fix this?

Thanks in advance.

 
Reply With Quote
 
 
 
 
Ken Snell [MVP]
Guest
Posts: n/a
 
      14th Jun 2005
3061 error, meaning "too few parameters...", right?

I assume that the SQL statement is a properly delimited text string in your
code:
selector = "SELECT Vendor.V_Name FROM Vendor WHERE (((Vendor.[V_
ID])=39));"

You mention "native ACCESS".... is this a reference to using the design view
of a query to create the SQL statement and to run the query? It works there,
but not in your code? What is the exact error message that you're getting?

--

Ken Snell
<MS ACCESS MVP>



"Andy Dorph" <(E-Mail Removed)> wrote in message
news:35CA080F-307E-4AF3-96CC-(E-Mail Removed)...
>I reference the proper DAO Library.
> I included Dim rs as DAO.RecorSet.
> I created the SQL in native Access.
> The Query works in native Access.
>
> The command lines are:
>
> selector = SELECT Vendor.V_Name FROM Vendor WHERE (((Vendor.[V_ ID])=39));
>
> Set rs = CurrentDb.OpenRecordset(selector)
>
> I am still receiving a 3061 error. What am I doing wrong? If nothing is
> wrong with the code, how do I fix this?
>
> Thanks in advance.
>



 
Reply With Quote
 
=?Utf-8?B?QW5keSBEb3JwaA==?=
Guest
Posts: n/a
 
      14th Jun 2005
Ken:

Error message states that 1 parameter is expected. The statement was cut
from the SQL view of Queries (after creating the query in the design view and
testing by looking at the worksheet view) and placed withing the quotation
marks as shown in the original message.

The field, V_ID is an auto number field.

Thanks!

"Ken Snell [MVP]" wrote:

> 3061 error, meaning "too few parameters...", right?
>
> I assume that the SQL statement is a properly delimited text string in your
> code:
> selector = "SELECT Vendor.V_Name FROM Vendor WHERE (((Vendor.[V_
> ID])=39));"
>
> You mention "native ACCESS".... is this a reference to using the design view
> of a query to create the SQL statement and to run the query? It works there,
> but not in your code? What is the exact error message that you're getting?
>
> --
>
> Ken Snell
> <MS ACCESS MVP>
>
>
>
> "Andy Dorph" <(E-Mail Removed)> wrote in message
> news:35CA080F-307E-4AF3-96CC-(E-Mail Removed)...
> >I reference the proper DAO Library.
> > I included Dim rs as DAO.RecorSet.
> > I created the SQL in native Access.
> > The Query works in native Access.
> >
> > The command lines are:
> >
> > selector = SELECT Vendor.V_Name FROM Vendor WHERE (((Vendor.[V_ ID])=39));
> >
> > Set rs = CurrentDb.OpenRecordset(selector)
> >
> > I am still receiving a 3061 error. What am I doing wrong? If nothing is
> > wrong with the code, how do I fix this?
> >
> > Thanks in advance.
> >

>
>
>

 
Reply With Quote
 
Ken Snell [MVP]
Guest
Posts: n/a
 
      14th Jun 2005
Sounds then as if one of the field names is not exactly the same as what is
in the table itself. I know that this seems impossible, seeing as how you
built the SQL string in the query designer. But, post the actual names of
the fields in the Vendor table and let's see what's there.

--

Ken Snell
<MS ACCESS MVP>



"Andy Dorph" <(E-Mail Removed)> wrote in message
news:7667C31A-2764-437A-8644-(E-Mail Removed)...
> Ken:
>
> Error message states that 1 parameter is expected. The statement was cut
> from the SQL view of Queries (after creating the query in the design view
> and
> testing by looking at the worksheet view) and placed withing the quotation
> marks as shown in the original message.
>
> The field, V_ID is an auto number field.
>
> Thanks!
>
> "Ken Snell [MVP]" wrote:
>
>> 3061 error, meaning "too few parameters...", right?
>>
>> I assume that the SQL statement is a properly delimited text string in
>> your
>> code:
>> selector = "SELECT Vendor.V_Name FROM Vendor WHERE (((Vendor.[V_
>> ID])=39));"
>>
>> You mention "native ACCESS".... is this a reference to using the design
>> view
>> of a query to create the SQL statement and to run the query? It works
>> there,
>> but not in your code? What is the exact error message that you're
>> getting?
>>
>> --
>>
>> Ken Snell
>> <MS ACCESS MVP>
>>
>>
>>
>> "Andy Dorph" <(E-Mail Removed)> wrote in message
>> news:35CA080F-307E-4AF3-96CC-(E-Mail Removed)...
>> >I reference the proper DAO Library.
>> > I included Dim rs as DAO.RecorSet.
>> > I created the SQL in native Access.
>> > The Query works in native Access.
>> >
>> > The command lines are:
>> >
>> > selector = SELECT Vendor.V_Name FROM Vendor WHERE (((Vendor.[V_
>> > ID])=39));
>> >
>> > Set rs = CurrentDb.OpenRecordset(selector)
>> >
>> > I am still receiving a 3061 error. What am I doing wrong? If nothing
>> > is
>> > wrong with the code, how do I fix this?
>> >
>> > Thanks in advance.
>> >

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error '3061' Ryan Microsoft Access Form Coding 2 5th Nov 2008 06:42 PM
Error 3061 ifcgroup@gmail.com Microsoft Access Form Coding 2 17th Feb 2007 07:34 PM
RE: 3061 Error =?Utf-8?B?Sm9lIEQ=?= Microsoft Access VBA Modules 0 23rd Jun 2006 02:39 AM
3061 Error =?Utf-8?B?TWF0dA==?= Microsoft Access Form Coding 5 24th Feb 2006 11:28 PM
Error 3061 Alain Microsoft Access Form Coding 2 5th Jan 2005 04:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:37 PM.