[RESOLVED] Setting Control Properties
I am using Access 2003
I have various levels of security with in a database and depending on the form, different controls need to be hidden or viewed. since this seems to change on a regular basis I wanted to store the control properties in a table and then apply them when the user logs in.
I do not know how to set the property values to that contained in the recordset.
This is what I currently have:
VB Code:
mysql = "Select * from tbl_SecuritySettings where Security_Level = '" & SecLevel & "' AND Form_Name = '" & frm.Name & "'"
Set rst = CurrentDb.OpenRecordset(mysql)
Do While Not rst.EOF
For Each ctl In frm
If ctl.Name = rst.Fields("Control_Name") Then
ctl.rst.Fields("Property_Name") = rst.Fields("Property_Setting") 'This section is the one that is unknown to me
Exit For
End If
MsgBox (ctl.Name)
Next ctl
rst.MoveNext
Loop
ANy assistance would be greatly appreciated.
Re: Setting Control Properties
Stupid me!
ctl.properties(rst.fields("Property_Name")) = rst.fields("Property_Setting")