Hide combo box with check box on another form

P

PD

I currently hide a combo box using "Check2" on "Form1".

"Private Sub Check2_AfterUpdate()

Me![Combo0].Visible = Me!Check2

End Sub

It works fine. How can I hide "combo1" on "Form2" using the same check box
on "Form1"?

Thanks!
 
P

PD

Thanks Klatuu

The control (checkbox) needs to be on form 1 because it is the control form
for a project. Form 1 is closed so my thought is to bind this value to a
table to be read by Form 2 on loading.

Thanks,
--
PRD


Klatuu said:
First, both forms must be open.

Forms![Form2]![Combo0].Visible = Me!Check2
--
Dave Hargis, Microsoft Access MVP


PD said:
I currently hide a combo box using "Check2" on "Form1".

"Private Sub Check2_AfterUpdate()

Me![Combo0].Visible = Me!Check2

End Sub

It works fine. How can I hide "combo1" on "Form2" using the same check box
on "Form1"?

Thanks!
 
K

Klatuu

Another method would be to use the OpenArgs argument of the OpenForm method
to pass the value of the check box from Form1 to Form2 (assuming Form1 opens
Form2). Since the OpenArgs property is a string, you can convert it to a
string to pass it and convert it back to a Boolean in Form2 when you receive
it.
--
Dave Hargis, Microsoft Access MVP


PD said:
Thanks Klatuu

The control (checkbox) needs to be on form 1 because it is the control form
for a project. Form 1 is closed so my thought is to bind this value to a
table to be read by Form 2 on loading.

Thanks,
--
PRD


Klatuu said:
First, both forms must be open.

Forms![Form2]![Combo0].Visible = Me!Check2
--
Dave Hargis, Microsoft Access MVP


PD said:
I currently hide a combo box using "Check2" on "Form1".

"Private Sub Check2_AfterUpdate()

Me![Combo0].Visible = Me!Check2

End Sub

It works fine. How can I hide "combo1" on "Form2" using the same check box
on "Form1"?

Thanks!
 

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