Advertisement

10.25.2006 at 09:07AM PDT, ID: 22037287
[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!

7.4

Continuous subform using a DAO recordset/ Access 2000

Asked by puppydogbuddy in Microsoft Access Database

Tags: , , ,

Hello Experts,
I am stumped on this one, and I would appreciate your expert assistance.  The problem with my current code is that, although the continuous subform in question runs without error, the underlying recordset code does not execute the looping porton of the code.  It processes the first record in the loop, and then stops.

The subform with the problem, is the second of 2 embedded continuous subforms.  The way that it is supposed to work is as follows:  the main form has two cascading combo boxes, which combine to display (on the first subform) a filtered list of account codes associated to a selected line item (example- all general ledger codes for a line item code of 108 entitled “Accounts Receivable”).  The second subform, is intended to enable the user to select from another combo box (one combo for each record displayed on the continuous subform) so that users can change the value of the bound column (line item code) to which each of the accounts are associated, with the change being automatically propagated to all accounts on the filtered list after the first selection is made.  Although I can change each account one by one by making a selection in each combo box, I have not been successful in taking the first selection and propagating it to all of the account codes on the filtered list.  Here is the pertinent code for the second subform.

The SQL code that was used to create the recordset for subform2:
----------------------------------------------------------------------------------------------------------------

strSQLSF2 = "SELECT " & "[tblChartOfAccts]" & "." & varAcctClass & "," & "[tblChartOfAccts]" & "." & varAcctCode2
strSQLSF2 = strSQLSF2 & "," & "[tblChartOfAccts]" & "." & varCafrLink2 & " From [tblChartOfAccts]"
strSQLSF2 = strSQLSF2 & "  WHERE [tblChartOfAccts]" & "." & varAcctCode2 & " IN " & "(Select " & varAcctCode & " From TempQry)"
strSQLSF2 = strSQLSF2 & " ORDER BY " & varAcctCode2


-------------------------------------------------------------------------------------------------------------------
Option Compare Database
Option Explicit

Dim iOldBoundColumnValue As Integer
Dim iNewBoundColumnValue As Integer
Dim sNewBoundColumnDescr As String

Private Sub cboAcctClass_Change()
On Error GoTo Error_Routine

Dim dBs As DAO.Database
Dim rst As DAO.Recordset

Dim iRecCount As Integer             'record count
Dim intReturn As Integer               'return from message box

Me.Parent!cboInquiryFinder.Requery
Me.Parent!frmChartUpdate_DetailCtl.Form![txtAcctTitle].Requery

'open recordset clone to handle combo box processing
Set dBs = CurrentDb()
Set rst = Forms("frmChartUpdate_Main").Controls("frmChartUpdate_DetailCtl2").Form.RecordsetClone

'get record count
iRecCount = rst.RecordCount

If Not (rst.BOF Or rst.EOF) Then
   With rst
        rst.MoveFirst
        'capture selection from combo box
        Me.cboAcctClass.SetFocus
        iNewBoundColumnValue = Me!cboAcctClass.Value
        sNewBoundColumnDescr = Me!cboAcctClass.Column(1)

        intReturn = MsgBox("You are about to change the report classification to " & sNewBoundColumnDescr & " for all " & iRecCount & " records.", vbOKCancel)
        If intReturn = vbCancel Then
            MsgBox "You must use the Chart of Accounts to make selective changes."
             cboAcctClass.Undo
            Resume Exit_Continue
        Else
            'rst.MoveNext
            'change all rows to new value of cboSelectIdx
            Do Until rst.EOF
               rst.Edit
                   With cboAcctClass
                             'Retrieves the value of the bound column which may or may not be
                                    'displayed in the list box
                             If iOldBoundColumnValue <> iNewBoundColumnValue Then
                                  Me!cboAcctClass.Value = iNewBoundColumnValue
                             End If
                    End With
               rst.Update
               Me!cboAcctClass.Requery
              ' Forms("frmChartUpdate_Main").Controls("frmChartUpdate_DetailCtl2").Form.Requery
               If iRecCount > 1 Then
                    rst.MoveNext
               Else
                    Exit Do
               End If
            Loop
       End If
   End With
End If
rst.Close
Exit_Continue:
    'clean up
    Set rst = Nothing
    iRecCount = 0
    iOldBoundColumnValue = Empty
    iNewBoundColumnValue = Empty
    sNewBoundColumnDescr = Empty
    intReturn = 0
    Exit Sub
Error_Routine:
        MsgBox "Error# " & Err.Number & " " & Err.Description
        Resume Exit_Continue
End Sub

Private Sub cboAcctClass_Enter()
On Error GoTo Error_Routine
     If Not IsNull(Me!cboAcctClass.Value) Then
         iOldBoundColumnValue = Me!cboAcctClass.Value
     End If
   
Exit_Continue:
        Exit Sub
Error_Routine:
        MsgBox "Error# " & Err.Number & " " & Err.Description
        Resume Exit_Continue

End Sub
Start Free Trial
[+][-]10.25.2006 at 09:33AM PDT, ID: 17804972

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.

 
[+][-]10.25.2006 at 09:39AM PDT, ID: 17805031

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.

 
[+][-]10.25.2006 at 09:48AM PDT, ID: 17805110

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.

 
[+][-]10.25.2006 at 09:58AM PDT, ID: 17805192

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.

 
[+][-]10.25.2006 at 10:04AM PDT, ID: 17805239

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.

 
[+][-]10.25.2006 at 10:54AM PDT, ID: 17805626

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.

 
[+][-]10.25.2006 at 10:59AM PDT, ID: 17805676

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.

 
[+][-]10.25.2006 at 11:57AM PDT, ID: 17806130

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.

 
[+][-]10.25.2006 at 12:32PM PDT, ID: 17806396

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.

 
[+][-]10.25.2006 at 12:53PM PDT, ID: 17806591

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
Tags: access, subform, dao, recordset
Sign Up Now!
Solution Provided By: jefftwilley
Participating Experts: 2
Solution Grade: A
 
 
[+][-]10.25.2006 at 12:56PM PDT, ID: 17806621

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.

 
[+][-]10.25.2006 at 01:45PM PDT, ID: 17807008

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.

 
[+][-]10.25.2006 at 02:03PM PDT, ID: 17807156

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.

 
[+][-]10.25.2006 at 02:08PM PDT, ID: 17807189

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.

 
[+][-]10.25.2006 at 02:27PM PDT, ID: 17807304

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.

 
[+][-]10.25.2006 at 02:39PM PDT, ID: 17807377

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.

 
[+][-]10.26.2006 at 05:01AM PDT, ID: 17810923

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.

 
[+][-]10.26.2006 at 05:04AM PDT, ID: 17810940

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.

 
[+][-]10.26.2006 at 05:10AM PDT, ID: 17810978

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.

 
[+][-]10.26.2006 at 05:15AM PDT, ID: 17811021

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.

 
[+][-]10.26.2006 at 05:18AM PDT, ID: 17811043

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