Solved

Select all fields on "tab"

Posted on 2004-09-08
1
291 Views
Last Modified: 2006-11-17
OK...I am using the "on current" section of a Form of mine to do the following...

Private Sub Form_Current()

        If Me.cboProjectStatus = "COMP" Then
        Me.alternate_project_nbr.Enabled = False
        Me.alternate_project_nbr.Locked = True
       
        Me.cboCRM.Enabled = False
        Me.cboCRM.Locked = True
       
        Me.cboProjectSize.Enabled = False
        Me.cboProjectSize.Locked = True
       
        Me.cboPriority.Enabled = False
        Me.cboPriority.Locked = True
End If
End Sub

My question is this...do I have to go through every field and specify it or can I specify the entire "tab section" of my form and will is select all of them that way?

I can do Me.tabDemand.Enabled = False

but that "dims" everything out.  I want it still "white" but just can't click on it.


Cheers!
Dark Magneto
0
Comment
Question by:darkmagneto
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 41

Accepted Solution

by:
shanesuebsahakarn earned 250 total points
ID: 12010533
Unfortunately not - tab controls and pages don't have an equivalent of the Locked option. They're either enabled or not, so you will need to cycle through the controls. One thing you could do is put something into the Tag properties of the controls (say the letter L) you want to lock and do something like this:

Dim ctl As Control

If Me!cboProjectStatus="COMP" Then
   For Each ctl In Me.Controls
      If ctl.Tag="L" Then
         ctl.Locked=True
         ctl.Enabled=False
      End If
    Next
End If

This will save you from having to write and maintain a long string of If/Then statements.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question