Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Disable editing on form based on selection of another field

Posted on 2013-01-25
6
Medium Priority
?
387 Views
Last Modified: 2013-01-25
I have a form that has several fields on it.  One of the controls is a Yes/No check box that the user selects if applicable.  The default is unchecked.

When the user checks the box, I want a couple of the other fields to grey out where the user cannot enter data into those fields.

The Yes/No check box is called RateCardCheck.  The fields I want to grey out if RateCardCheck is check are:

dtaEstValue
dtaEstLabor$
dtaProjHrs

I tried an After Update to make the 3 fields not visible but it only worked once.  When I unchecked the box, the fields did not re-appear.
0
Comment
Question by:actolex
[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
  • 3
  • 2
6 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 38819874
use the afterupdate or click event of the checkbox

me.dtaEstValue.enabled=not me.RateCardCheck

me.[dtaEstLabor$].enabled=not me.RateCardCheck

me.dtaProjHrs.enabled=not me.RateCardCheck
0
 
LVL 31

Expert Comment

by:hnasr
ID: 38820249
If version:

If RateCardCheck Then
    dtaEstValue.Enabled = False
    dtaEstLabor$.Enabled=False
    dtaProjHrs.Enabled=false
Else
    dtaEstValue.Enabled = True
    dtaEstLabor$.Enabled=True
    dtaProjHrs.Enabled=True
End IF
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 38820255
too many lines of codes, when you can do it 3
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 

Author Comment

by:actolex
ID: 38820668
Both don't work....I'll try again this weekend.
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 38820685
what codes do you have?

post it here.


is it  like this

private sub RateCardCheck_afterUpdate()

me.dtaEstValue.enabled=not me.RateCardCheck

me.[dtaEstLabor$].enabled=not me.RateCardCheck

me.dtaProjHrs.enabled=not me.RateCardCheck 

end sub

Open in new window


or this

private sub RateCardCheck_click()

me.dtaEstValue.enabled=not me.RateCardCheck

me.[dtaEstLabor$].enabled=not me.RateCardCheck

me.dtaProjHrs.enabled=not me.RateCardCheck 

end sub

Open in new window


and

private sub form_current()

me.dtaEstValue.enabled=not me.RateCardCheck

me.[dtaEstLabor$].enabled=not me.RateCardCheck

me.dtaProjHrs.enabled=not me.RateCardCheck 

end sub

Open in new window

0
 

Author Comment

by:actolex
ID: 38820925
capricorn1....I used the first set of code...now works great !!!!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

715 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