making controls visible or not on a continuous form

  • Thread starter james_keegan via AccessMonster.com
  • Start date
J

james_keegan via AccessMonster.com

I'm pretty sure what I want to do can't be done, but here goes.

I wanted to use a continuous form to display a bunch of records at once.

But there are some controls that I only want to display if the values of
other controls determin it.

So, if the 'interpreter needed' control is TRUE, then I need the 'interpreter
type' option-group control to be visible, and if 'interpreter needed is FALSE,
then I want that option group to NOT be visible. Similarly, if the
'interpreter-type' option group is set to 'sign language' then I don't need
the 'interpreter language' text box to be visible, but if the 'interprety
type' is set to 'foreign language' then I DO need the interprete-language
field to be visible so that they can indicated whether the interpreter needs
to speak Spanish, Russian or whatever.

I don't think 'conditional formatting' will help here, will it?

I'm pretty sure I'm SimplyOutaLuck (the politically correct anti-acronym for
SOL) as far as this goes, and can live with the un-needed controls being
visible, but I was hoping to make it look cleaner by hiding them when they
weren't relevant.

Can someone confirm that I'm SOL here so I can stop banging my head against
this particular wall, and move on to some other wall?! Thanks.

JK
 
J

Jeff L

You could use the On Current event for your form to display the
appropriate fields. It will run every time you move to a new record.
So your code would be something like

If Me.InterpeterNeeded = True then
Me.InterpreterType.Visible = True
Else
Me.InterpreterType.Visible = False
End IF

In an option group, each option is assigned a value, usually a number.
So let's say the value for Foreign Language is 1 in the option group:

If Me.InterpreterType = 1 then
Me.InterpreterLanguage.Visible = True
Else
Me.InterpreterLanguage.Visible = True
End IF

Hope that helps!
 
J

John Vinson

I don't think 'conditional formatting' will help here, will it?

With a little twiddling, yes. You can set the Forecolor and Backcolor
to be identical ("Blonde On Blonde" if you're old enough to remember
that<g>), and the textbox will be blank. You can even superimpose
textboxes on one another if they're set to transparent and aren't both
going to be visible at the same time.

John W. Vinson[MVP]
 
A

Albert D. Kallal

I certainly have a lot of continues forms where I set the controls 'enabled'
property on/off. While this actually makes all instances of the control go
disabled, I actually find this works quite well. I mean, when you move
to the next row, those columns that you enable, or disable can then
be set. So, you could set the controls visible property as you move
the cursor up/down through the

In fact, I actually PREFER the above behavior, as then during
data entry it is VERY easy to see that the column in question
is enabled.

In place of a VERY HARD TO READ checkerboard pattern of enabled, and
disabled boxes,
, you get a very nice enable/display view as I move the cursor up /down.

I have uploaded a gif animation of me navigating in a form, both of the two
screen shots will give you an idea of how this looks.

http://www.members.shaw.ca/AlbertKallal/HideColumn/index.htm

Take a look at BOTH of the above screens, you can see that the behaviours I
describe are not that bad...
 

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