Visibility code

  • Thread starter Thread starter ladybug via AccessMonster.com
  • Start date Start date
L

ladybug via AccessMonster.com

I have a frame on a subform called fram_srpm_rom. Within this frame there
are two options. srpm, which when selected =1. rom, which when selected =2.
Now on this subform there are other text boxes, check boxes and command
buttons that I would like to not be available in srpm is selected.

I do not want the following to be available or visible once srpm is selected:
expect_comp_dt (text box)
rom_comp (check box)
cmd_rom_comp (command button)
pap_rxo_comp (check box)

Can someone help me with this code and where in the subform to put it?
Thank you!
 
ladybug said:
I have a frame on a subform called fram_srpm_rom. Within this frame there
are two options. srpm, which when selected =1. rom, which when selected =2.
Now on this subform there are other text boxes, check boxes and command
buttons that I would like to not be available in srpm is selected.

I do not want the following to be available or visible once srpm is selected:
expect_comp_dt (text box)
rom_comp (check box)
cmd_rom_comp (command button)
pap_rxo_comp (check box)

Can someone help me with this code and where in the subform to put it?


Put the code in the frame's AfterUpdate event.

Me.expect_comp_dt.Visible = (Me.fram_srpm_rom = 2)
Me.rom_comp = (Me.fram_srpm_rom = 2)
Me.cmd_rom_comp = (Me.fram_srpm_rom = 2)
Me.pap_rxo_comp = (Me.fram_srpm_rom = 2)
 
Only the one text box went away. The check boxes and command buttons still
appear.

Marshall said:
I have a frame on a subform called fram_srpm_rom. Within this frame there
are two options. srpm, which when selected =1. rom, which when selected =2.
[quoted text clipped - 8 lines]
Can someone help me with this code and where in the subform to put it?

Put the code in the frame's AfterUpdate event.

Me.expect_comp_dt.Visible = (Me.fram_srpm_rom = 2)
Me.rom_comp = (Me.fram_srpm_rom = 2)
Me.cmd_rom_comp = (Me.fram_srpm_rom = 2)
Me.pap_rxo_comp = (Me.fram_srpm_rom = 2)
 
ladybug said:
Only the one text box went away. The check boxes and command buttons still
appear.

Marshall said:
I have a frame on a subform called fram_srpm_rom. Within this frame there
are two options. srpm, which when selected =1. rom, which when selected =2.
[quoted text clipped - 8 lines]
Can someone help me with this code and where in the subform to put it?

Put the code in the frame's AfterUpdate event.

Me.expect_comp_dt.Visible = (Me.fram_srpm_rom = 2)
Me.rom_comp = (Me.fram_srpm_rom = 2)
Me.cmd_rom_comp = (Me.fram_srpm_rom = 2)
Me.pap_rxo_comp = (Me.fram_srpm_rom = 2)


Arrrggghhh. I fumbled the copy paste. It should have been:

Me.expect_comp_dt.Visible = (Me.fram_srpm_rom = 2)
Me.rom_comp.Visible = (Me.fram_srpm_rom = 2)
Me.cmd_rom_comp.Visible = (Me.fram_srpm_rom = 2)
Me.pap_rxo_comp.Visible = (Me.fram_srpm_rom = 2)
 
No problem. Thank you so much!

Marshall said:
Only the one text box went away. The check boxes and command buttons still
appear.
[quoted text clipped - 11 lines]
Arrrggghhh. I fumbled the copy paste. It should have been:

Me.expect_comp_dt.Visible = (Me.fram_srpm_rom = 2)
Me.rom_comp.Visible = (Me.fram_srpm_rom = 2)
Me.cmd_rom_comp.Visible = (Me.fram_srpm_rom = 2)
Me.pap_rxo_comp.Visible = (Me.fram_srpm_rom = 2)
 
Back
Top