Visibility of detail fields

A

Andy

I have a form which displays all rows in a table (each row has 4 fields) using 4 text boxes
Is it possible to control the visibility of one of these text box fields depending on the value in the row field? i.e for some rows the user see all 4 fields but for some they will only see 3? They will still see all rows

Thanks.
 
J

Jeff Boyce

Andy

If you add code to the OnCurrent event of the form, when each row "loads"
into the form, you will be able to evaluate the values. If you decide,
based on the values, that a field should not be displayed, you can make it
invisible with something like:

Me![MyFieldX].Visible = False
 
A

Andy

Thanks Jeff - that works but if you have the code :-

If Me![MyFieldX] = "3" Then
Me![MyFieldX].Visible = False
End If

If the first row returned to the form has the value "3" for MyFieldX then, yes, the field is made invisible BUT it is made invisible for all of the rows returned even though some rows have values in the field other than "3".

I need just the rows with "3" to be invisible.
 
J

Jeff Boyce

Andy

So, you (aren't) saying that you aren't using a form that displays a single
record per form?! But your description sounds like you are displaying ALL
the rows at once.

More info, please...

Jeff Boyce
<Access MVP>
 
J

Jeff Boyce

Andy

I seem to recall a previous post on this subject. Have you tried checking
at Google.com? Sorry I can't be of more direct assistance. By the way, is
your form set to "Continuous" or "DataSheet"?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top