Results 1 to 2 of 2

Thread: [RESOLVED] Setting Control Properties

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2001
    Location
    Washington DC
    Posts
    330

    Resolved [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:
    1. mysql = "Select * from tbl_SecuritySettings where Security_Level = '" & SecLevel & "' AND Form_Name = '" & frm.Name & "'"
    2.          
    3.     Set rst = CurrentDb.OpenRecordset(mysql)
    4.     Do While Not rst.EOF
    5.    
    6.             For Each ctl In frm
    7.                 If ctl.Name = rst.Fields("Control_Name") Then
    8.                     ctl.rst.Fields("Property_Name") = rst.Fields("Property_Setting") 'This section is the one that is unknown to me
    9.                     Exit For
    10.                 End If
    11.                   MsgBox (ctl.Name)
    12.             Next ctl
    13.        
    14.         rst.MoveNext
    15.     Loop

    ANy assistance would be greatly appreciated.
    Swoozie
    Somedays you just should not get out of bed.

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2001
    Location
    Washington DC
    Posts
    330

    Re: Setting Control Properties

    Stupid me!

    ctl.properties(rst.fields("Property_Name")) = rst.fields("Property_Setting")
    Swoozie
    Somedays you just should not get out of bed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width