UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Referencing controls on a form    
 
   
QDS
post May 30 2002, 10:34 PM
Post#1


UA VIP + UtterAccess Ruler
Posts: 2,740
Joined: 5-October 01
From: Kalispell, Montana


I get asked about referencing controls on forms about once a week.Below is an example of how to reference all of the controls on a form at once.

    Dim frm As Form

Dim ctl As Control

Set frm = Screen.ActiveForm
For Each ctl In frm.Controls
Select Case ctl.ControlType
Case acCheckBox, acTextBox, acListBox, acComboBox
ctl.Locked = True
End Select
Next ctl

The above code can be used to clear data from all of the controls or used to disable the controls.
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    13th December 2017 - 09:41 AM