hiding some fields

GuidoNTS

Registered User.
Local time
Today, 19:02
Joined
May 27, 2008
Messages
13
Hello

Depending on the value of a field I want to hide an other one.

See my attachment:
When the field "Genomen" (blue) is visible the field "Omschrijving" in red must be invisible but the field "Omschrijving" in blue must stay visible.

Guido

naamloos.GIF
 
You would need to look at the events behind the form or behind the field.

You can use either IF Statements or Case Statements.

Open the form in design view then select the form properties and select the Event Tab and then use On Current, add the following code

If me.Field Name.value >0 then
me.other field name.visible=false
esle
me.other field name.visible = true
End if

Give this ago and see how you get on, then reply for other options.
 
Hello

When I add your code to the event OnCurrent either all the 4 records are hidden or no one is hidden.

And also your code works when I'm navigating in the records.
What I want is to see or not those fields when the forms is opened.

Guido
 
In Continuous or Design View forms, such as the one in your attachment, most conditional formatting cannot be done thru code. The reason for this is that while you think you have multiple "Genomen" textboxes, you have, in fact, multiple instances of a single textbox, and any formatting you apply to it will be applied to all instances for the textbox. In other words, if "Genomen" is invisible in one record it will be invisible in all records!

Trevor's type of code can only be used in Single View Forms.

To do Conditional Formatting in Continuous or Design View forms, you have to use CF from the Format menu.

Unfortunately, using CF from the menu does not include setting the visibility/invisibility of controls. The closest to this that you could do would be to set the Back Color and Fore Color to the same color if a condition exists.
 
Thanks Missinglinq

Your solution helps me.:) :)

GuidoNTS
 

Users who are viewing this thread

Back
Top Bottom