Need your help with Access query

While ago, I ask help to build the mechanism for random selection and it was fine
now, i am using different tables and checked everything but i have an error...
Run time error 3061. too few parameters. expected 1
WHAT IS WRONG, please


so the process is straight forward, i have an input file "MBL QC List_Preliminary'
AND THEN i need to pick 3 percent of activities for each user
RandomSelectionMBLDB.accdb
rfedorovAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jeffrey CoachmanMIS LiasonCommented:
What row is highlihted when you get the error?

Where exactly is the "randomization" taking place (query?, ...Code?)

Perhaps you should post an example of the "working" system...?
0
Gustav BrockCIOCommented:
>  too few parameters. expected n

This normally means that a field or parameter is misspelled. Then Access thinks it is a parameter missing.

/gustav
0
Rey Obrero (Capricorn1)Commented:
in your function CreateRandomMBLList you are using field "DateQCCompleted"
which does not exists in your tables


use this

      DBEngine(0)(0).Execute "Insert Into Top3PctMBL (ID, [Activity ID Key], [Processor Long Name], [Closed Date], Picked, DatePicked,DateLoaded,DateCompleted)" & _
            "SELECT TOP 3 PERCENT                       ID, [Activity ID Key], [Processor Long Name], [Date Closed], Picked, DatePicked,DateLoaded,DateCompleted " & _
            "FROM  [tblMBL_QC_Selection] " & _
            "WHERE [tblMBL_QC_Selection].Picked = False and  [tblMBL_QC_Selection].[Processor Long Name]='" & rsUniqueNames![Processor Long Name] & "'" & _
            "ORDER BY RandomNumber(ID);"
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Rey Obrero (Capricorn1)Commented:
use this

        DBEngine(0)(0).Execute "Insert Into Top3PctMBL (ID, [Activity ID Key], [Processor Long Name], [Closed Date], Picked, DatePicked,DateLoaded,DateCompleted)" & _
            " SELECT TOP 3 PERCENT                       ID, [Activity ID Key], [Processor Long Name], [Date Closed], Picked, DatePicked,DateLoaded,DateCompleted " & _
            " FROM  [tblMBL_QC_Selection] " & _
            " WHERE [tblMBL_QC_Selection].Picked = False and  [tblMBL_QC_Selection].[Processor Long Name]='" & rsUniqueNames![Processor Long Name] & "'" & _
            " ORDER BY RandomNumber(ID);"
0
rfedorovAuthor Commented:
Thank you very much, Rey
you are right, completely forgot about the different name DateCompleted... now i am fine...
0
rfedorovAuthor Commented:
thank you all, great to have you all...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.