How to hide a field(s) selectively based on a field from the same report?

spenz

Registered User.
Local time
Today, 22:52
Joined
Mar 26, 2009
Messages
61
I am using MS ACCESS 2007 run by a Windows XP.

I need to hide a field only if a certain field is also hidden. I've also tried sir Allen Brown's solution but it appears it only works if I am still using Access 2003 version. Can anyone confirm if this only works on access 2003 version exclusively. Thanks

file:///C:/Documents and Settings/S...Tips/Simple/Hide duplicates selectively R.htm
 
Your link is to something in your docuemnts on your computer, so we can't see what that solution was.

In access 2003 I'd use the form's OnCurrent event and the places where the first control is hidden or un-hidden and use something like:

Me!Field1.Visible = Me!Field2.Visible

This means that Field1 will be visible if Field2 is visible, and Field1 will be hidden if Field2 is hidden. I don't know for definite if this will work in Access 2007, but I think these commands have stayed basically the same.

Don't forget that in Access 2007 all code is turned off by default and you have to sort out your Trust Centre settings to get it to run.
 

Users who are viewing this thread

Back
Top Bottom