W
WSF
Access97
I am trying to work out a way to set control.visible properties depending on
User.
I have a table containing the list of controls [ControlName] against which
is listed the form's name [FormName] and each user a separate field - the
field name is their login initials (e.g. [ab] [cd] [ef] etc) The user fields
are Yes/No.
What I would like to do is open the recordset and have a simple function
that extracted the form name and control and set its .visible property to
whatever the user field holds. That is by populating the recordset
(MoveLast, MoveFirst)
With [the recordset]
Flag = .Fields(LoginInitials)
I have tested the extraction of the data with a message box - msgbox
FormName & "!" & ControlName & ".Visible = " & Flag
By looping through MoveNext this "displays" the correct string and goes
through the list of Forms - Controls etc in the list until EOF.
Great.
But how do I get this to work to actually set the property of the control to
whatever the flag is down through the list?
Is there a better way of doing this?
Any help gratefully appreciated
WSF
I am trying to work out a way to set control.visible properties depending on
User.
I have a table containing the list of controls [ControlName] against which
is listed the form's name [FormName] and each user a separate field - the
field name is their login initials (e.g. [ab] [cd] [ef] etc) The user fields
are Yes/No.
What I would like to do is open the recordset and have a simple function
that extracted the form name and control and set its .visible property to
whatever the user field holds. That is by populating the recordset
(MoveLast, MoveFirst)
With [the recordset]
Flag = .Fields(LoginInitials)
I have tested the extraction of the data with a message box - msgbox
FormName & "!" & ControlName & ".Visible = " & Flag
By looping through MoveNext this "displays" the correct string and goes
through the list of Forms - Controls etc in the list until EOF.
Great.
But how do I get this to work to actually set the property of the control to
whatever the flag is down through the list?
Is there a better way of doing this?
Any help gratefully appreciated
WSF