G
Guest
Hi everyone,
I have a bound object 1 and another bound object 2 in a form. I was hoping
to hide object 2 when object 1 is empty, and unhide it when object 1 isn't
empty.
Nikos has kindly suggested the following lines and I've amended them
slightly to suit my application, but a type mismatch error occurs when I run
the code. I wonder if it is because different extraneous character (such as "
and #) should be used for bound object? Could someone please educate me a bit
more?
Regards,
Sam
I have a bound object 1 and another bound object 2 in a form. I was hoping
to hide object 2 when object 1 is empty, and unhide it when object 1 isn't
empty.
Nikos has kindly suggested the following lines and I've amended them
slightly to suit my application, but a type mismatch error occurs when I run
the code. I wonder if it is because different extraneous character (such as "
and #) should be used for bound object? Could someone please educate me a bit
more?
Form Current -> so it fires when the form opens, and when moving from
record to record
Bound object 1 Before Update -> so it fires if when the user changes it
The code (the same in both events) would look something like:
vShow = Not (Me.BoundObject1 = "" Or IsNull(Me.BoundObject1))
' the line above returns a type mismatch error
Me.BoundObject2.Visible = vShow
Me.BoundObject1Label.Visible = vShow
Regards,
Sam