Page 5 of 5 FirstFirst 12345
Results 61 to 67 of 67
  1. #61
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,389

    I guess there is no way to keep displaying the current record and still get the form to see the newly changed query table?
    Well, gee, if the current record is inactive and you click Active=yes, it would be a bug to keep showing the same record - the form recordsource changes!

  2. #62
    WCStarks is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    314
    Yes. Of course, but it also does it in the other direction, when an active person is also valid in the unchecked mode. I guess it really doesn't matter all that much. I am happy to get it finding members all the time. Thank again.

  3. #63
    WCStarks is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    314
    Well, this fix has an unexpected behavior. When I toggle the Is_Active status while editing a record on another form, such as on the Events form, it closes the record and takes me to the most recent event record in the Events form.

    The original issue that we were addressing is only manifested on the default Members form, not with the other forms. The other forms have always worked correctly when the Is_Active status was toggled. (Perhaps if only that I had already changed forms. I don't know why.) The only time it was an issue is with the default Members form, after first opening the db, and before having gone to another form. Returning to the Members form, after having been on another form, the Members form also worked correctly from then on, without the "fix", until the db is closed. So, I am back to square one, having commented out the fix statement. I tried changing the "Requery" to "Refresh" in that statement, but that is apparently invalid.

  4. #64
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,389
    Does the 'Active' checkbox apply to any subform other than the membership subform? If it's only for the membership tab, then you could simply move the checkbox to that subform and it wouldn't affect any other subform.

  5. #65
    WCStarks is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    314
    Most of the modules use this feature. But it is only the Members module which is having this issue. The other forms, do not experience this issue. They correctly respond to the toggling of the active status. Assets and Agencies modules are currently looking only at all members, because I have not yet modified them. Perhaps a fix for just the Members module would be best.

  6. #66
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,389
    This rev will restrict the active checkbox to only affect the members subform.

    Code:
    Option Compare Database
    Option Explicit
    
    
    Private Sub Form_Load()
        'Call Is_Active_AfterUpdate
    End Sub
    
    
    Private Sub Is_Active_AfterUpdate()
        ' By Davegri on Access Forum
        Dim ssql As String
        Select Case Is_Active
            Case True
                ssql = "select * from members where Active = true"
            Case False
                ssql = "Select * from Members"
        End Select
        Call fcnMakeNamedQryFromSQLString(ssql, "qry_MembersSelected")
       
       'below will set the recordsource for only the members subform as the checkbox is clicked!
        If Me.NavigationControl0.SelectedTab.Name = "NavigationButton14" Then
            Me.NavigationSubform.Requery
        End If
        
        DoEvents
        Select Case Me.NavigationControl0.SelectedTab.Name
            Case "nbMembers"
                Me.NavigationSubform.Form.RecordSource = "qry_MembersSelected"
            Case Else
                Forms![Manage SCATeam].NavigationSubform.Form.Refresh
        End Select
     End Sub

  7. #67
    WCStarks is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    314
    Thanks you.

Page 5 of 5 FirstFirst 12345
Please reply to this thread with any new information or opinions.

Similar Threads

  1. DoCmd.RunCommand acCmdSaveRecord Problem
    By musicopr in forum Programming
    Replies: 3
    Last Post: 06-23-2017, 06:45 PM
  2. Replies: 2
    Last Post: 09-27-2016, 09:10 PM
  3. docmd.runcommand accmdpaste - data is NULL
    By dickn in forum Programming
    Replies: 7
    Last Post: 07-16-2013, 04:27 PM
  4. Replies: 0
    Last Post: 06-17-2010, 04:51 AM
  5. DoCmd.RunCommand acCmdSaveRecord
    By Rick West in forum Programming
    Replies: 3
    Last Post: 04-22-2010, 02:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums