Visibility of detail fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
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.
 
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>
 
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"?
 
Back
Top