Solved

Trying to hide value in a form field until another field = "Y"

Posted on 2014-02-08
2
506 Views
Last Modified: 2014-02-13
I have 2 fields on a form.  The first one is a value list field and the choices are either "Y" or "N".

The second field is a calculated field being calculated in the query which the form is using as its record source.

But I want the value in the second field to be hidden until the value in the 1st field = "Y" and I can't seem to make it happen that way.  The value in the second field displays no matter what.

--Steve
0
Comment
Question by:SteveL13
2 Comments
 
LVL 29

Accepted Solution

by:
IrogSinta earned 500 total points
ID: 39844459
In the AfterUpdate event of the List Control add something like this:
Me.NameOfCalculatedControl.Visible = (Me.NameOfListControl = "Y")

Open in new window

Then in the OnCurrent event of the form call the AfterUpdate event of your list control:
Call NameOfListControl_AfterUpdate

Ron
0
 
LVL 20

Expert Comment

by:clarkscott
ID: 39845166
I was going to suggest another way... but Ron's is perfect.

Scott C
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
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…

808 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