subform - 2nd question

  • Thread starter Thread starter kiki
  • Start date Start date
K

kiki

Hi

I have made my first steps with subforms and I am sattisfied:)
What I don't know how to is following :

On my main form I have Subform (created with wizard) based on continuous
form. I'd like to have some fields disabled related to some related value.
For example :

Select Case TRX_Type
Case Is = "dTRX"
Ctl2x06_Mode.Enabled = True
Case Is = "EDGE dTRX"
Ctl2x06_Mode.Enabled = True
Case Else
Ctl2x06_Mode = " "
Ctl2x06_Mode.Enabled = False
End Select

I need something which will "Scan" all xyTableID's and if it finds some
previously satisfied rules than to change related fields properties, and
present it in that way on subform.

Something like

For Each tableID In xyTable
Select Case....
Next

Is it possible to do it somehow?
Thanks
 
I explained too complicated.

Is is possible to have different background colors in the continuous form
for the same fiels?
If I change background color for one field it is authomaticaly changed for
all same fields.

Thanks
 
The only way to do this in a ContinuousFormView is to use Conditional
Format.

Check Access Help on Conditional Format.
 
Does it exist in Access97???

Van T. Dinh said:
The only way to do this in a ContinuousFormView is to use Conditional
Format.

Check Access Help on Conditional Format.
 
Van T. Dinh said:
Does it exist in Access97???

No, but there is a work-around. Basically you set up a TextBox _behind_ all of
the other controls and have the BackColor of the other controls set to
Transparent. This allows the TextBox in the background to show through. Then
you set the font of the TextBox in the background to one that includes a square
block character (like Terminal). With a ControlSource like...

=IIf([SomeField] < SomeValue, String(n, Chr), "")

....where n is the number of blocks you want displayed and Chr is the character
entry that produces the block you will now have a TextBox that will display a
solid background (made up of continuous block characters) whenever [SomeField] <
SomeValue. Of course you would substitute whatever you needed for the test
expression.

With the ForeColor property set to 255, this will produce a red background
whenever the test is satisfied. To have multiple background colors you would
simply repeat with an additional TextBox in the background.

It's actually easier than it sounds :-)
 
Back
Top