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.