Results 1 to 2 of 2
  1. #1
    Flickster is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2015
    Posts
    1

    Visible Properties For All Users After Update

    I have a form that is used to maintain current status of vehicles in a bay. I have code that hides a collection of textboxes and images based on whether or not a vehicle is in the bay. This database is used on a network and is shared amongst several users. My current code is this:





    Code:
    Private mcolVehBay1 As New Collection
    Private Sub ShowControls(mcol As Collection, bolShow As Boolean)
        Dim ctl As Control
        For Each ctl In mcol
          ctl.Visible = bolShow
        Next ctl
        Set ctl = Nothing
      End Sub
    
    Private Sub InitializeCollections()
         Dim ctl As Control
         If mcolVehBay1Count = 0 Then
            For Each ctl In Me.Controls
              If ctl.Tag = "VehBay1" Then
                 mcolVehBay1.Add ctl, ctl.Name
             End If
           Next ctl
           Set ctl = Nothing
        End If
    
    End Sub
    
    
    Private Sub CtlVehBay1CB_AFterupdate()
    '**** 7 = Empty******
    
    If Me![VehBay1CB] = "7" Then   
        Call ShowControls(mcolVehBay1, False)
        Else
        Call ShowControls(mcolVehBay1, True)
    End If
    
    End Sub


    The data itself will update but the visible properties of the controls will not update across all users. How do I get it to update the visibility property for all users.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Your code seems to hide a collection of controls based on the value of a single control, CtlVehBay1CB.

    If you want other users to understand what the value of CtlVehBay1CB is, then they will have to look and see what the value of CtlVehBay1CB is. If the control is bound to a table or query, all of the other users can look to the table for the current value.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 16
    Last Post: 03-26-2015, 08:35 PM
  2. Replies: 3
    Last Post: 03-11-2014, 09:32 AM
  3. Replies: 6
    Last Post: 12-03-2013, 02:59 AM
  4. Replies: 2
    Last Post: 01-06-2011, 04:38 AM
  5. Replies: 5
    Last Post: 01-29-2010, 11:09 AM

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