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    
post May 30 2002, 10:34 PM

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    19th December 2018 - 02:26 AM