Advertisement

03.05.2008 at 01:43PM PST, ID: 23217646
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.9

Error when Referring To a Field on a Form In an SQL statement in Access 2003

Asked by Hubbsjp21 in Microsoft Access Database

I have run into this problem before, but could not dig up the old solution.  I have code that runs on the AfterUpdate event of a combo box on a form.  In the code, I refer to the value in the combo box, but always get this error:

 . . . . Run-time error '3061':

 . . . .Too few parameters. Expected 1.

The debugger points to the last line in this snippet

Set rsBranch = CurrentDb.OpenRecordset("select distinct branch from qryProductionCorr")

I have run into this before, and am pretty sure my sytax is wrong based on the referral to the value in the combo box.  I have attached the snippet of code to this question.

Does anyone know the correct syntax here?

Thanks,

HubbsStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
Dim rs As DAO.Recordset, rsBranch As DAO.Recordset
Dim i As Integer, j As Integer, shtCnt As Integer
Dim sSql As String, branchCnt As Integer, colCnt, rowCnt, iCol, iRow
Dim xlObj As Object, nSheet As Object
Dim sqlProd As String
Dim srch As String
 
srch = Forms!frmRptGenerator.cmbCorrSearch
 
txtNameEnd = Format(Now(), "mmddyy_hh_nn_ss")
 
Dim qdf As DAO.QueryDef
Set qdf = CurrentDb.QueryDefs("qryProductionCorr")
 
sqlProd = "SELECT qryProductionWA_Corr.BRANCH, qryProductionWA_Corr.MS_Current, qryProductionWA_Corr.Start_Date, qryProductionWA_Corr.MS_Curr_Date, qryProductionWA_Corr.Borr_Last, qryProductionWA_Corr.Loan_Amnt,"
sqlProd = sqlProd & " qryProductionWA_Corr.Prop_Class, qryProductionWA_Corr.Loan_Ofcr, qryProductionWA_Corr.Prop_City, qryProductionWA_Corr.Prop_State, qryProductionWA_Corr.Cor_Name"
sqlProd = sqlProd & " FROM qryProductionWA_Corr"
sqlProd = sqlProd & " WHERE ((qryProductionWA_Corr.Cor_Name) Like Forms!frmReportGenerator.cmbCorrSearch)"
sqlProd = sqlProd & " ORDER BY BRANCH, qryProductionWA_Corr.Order, qryProductionWA_Corr.Start_Date;"
 
qdf.SQL = sqlProd
 
Set rsBranch = CurrentDb.OpenRecordset("select distinct branch from qryProductionCorr")
[+][-]03.05.2008 at 01:52PM PST, ID: 21054937

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.05.2008 at 01:58PM PST, ID: 21054989

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.05.2008 at 02:00PM PST, ID: 21055010

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]03.05.2008 at 02:01PM PST, ID: 21055019

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.05.2008 at 02:04PM PST, ID: 21055063

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Access Database
Sign Up Now!
Solution Provided By: nsanga
Participating Experts: 4
Solution Grade: A
 
 
[+][-]03.05.2008 at 02:05PM PST, ID: 21055072

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.05.2008 at 02:07PM PST, ID: 21055095

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.05.2008 at 03:06PM PST, ID: 21055615

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628