Don't show text box

A

an

Hello!

In MainForm I have a combo box.
Through of the code OnOpen MainForm < Me![SubF_NameForQuadr].Visible =
False>, show us that a subform, only after click in combo.
When the SubForm open, appear right away the empty text boxes.

I would like to show the text box only if it will have data in records
clicked in combo.
If don't have data in records selected in combo, the text boxes don't appear.
How is possible to do this, please?

I tried

If [MyField] Is Empty Then
[MyField].Visible = False
Else
....
....

But don't work.

Thanks in advance.
an
 
G

George Nicholson

One approach:
[MyField].Visible = Len(nz([MyField],""))
(if the field has 1 or more characters it will be visible)
 
A

an

George Nicholson

for 2nd time, today...

Problem solved.
Thank you very much.

an

George Nicholson said:
One approach:
[MyField].Visible = Len(nz([MyField],""))
(if the field has 1 or more characters it will be visible)

--
George Nicholson

Remove 'Junk' from return address.


an said:
Hello!

In MainForm I have a combo box.
Through of the code OnOpen MainForm < Me![SubF_NameForQuadr].Visible =
False>, show us that a subform, only after click in combo.
When the SubForm open, appear right away the empty text boxes.

I would like to show the text box only if it will have data in records
clicked in combo.
If don't have data in records selected in combo, the text boxes don't
appear.
How is possible to do this, please?

I tried

If [MyField] Is Empty Then
[MyField].Visible = False
Else
...
...

But don't work.

Thanks in advance.
an
 
Top