Hide lables, textboxes and combo boxes on MS Access form -
i using ms access 2007.
how can hide labels, text boxes , combo boxes in form when click button on form?
here have tried getting error: application-defined or object-defined error:
private sub cmdadd_click() form!frmdetails!label105.visible = false form!frmdetails!combo110_label.visible = false form!frmdetails!combo110.visible = false form!frmdetails!label27.visible = false form!frmdetails![first name].visible = false form!frmdetails![second name].visible = false form!frmdetails!lastname.visible = false form!frmdetails![id type_label].visible = false form!frmdetails!combo43.visible = false form!frmdetails![id no].visible = false form!frmdetails!label33.visible = false form!frmdetails!address.visible = false form!frmdetails!address2.visible = false form!frmdetails!address3.visible = false form!frmdetails!label39.visible = false form!frmdetails![contact no].visible = false form!frmdetails!label112.visible = false form!frmdetails!combo113.visible = false form!frmdetails!label113.visible = false form!frmdetails!cbostatus.visible = false form!frmdetails!cmdsave.visible = false form!frmdetails!cmdprint.visible = false end sub
regards.
joseph
are these controls on same form on button using hide? if can use me.controlname
.visible
apart that, using form!formname
!controlname
.visible should be, forms!formname
!controlname
.visible
private sub cmdadd_click() forms!frmdetails!label105.visible = false forms!frmdetails!combo110_label.visible = false forms!frmdetails!combo110.visible = false forms!frmdetails!label27.visible = false forms!frmdetails![first name].visible = false forms!frmdetails![second name].visible = false forms!frmdetails!lastname.visible = false forms!frmdetails![id type_label].visible = false forms!frmdetails!combo43.visible = false forms!frmdetails![id no].visible = false forms!frmdetails!label33.visible = false forms!frmdetails!address.visible = false forms!frmdetails!address2.visible = false forms!frmdetails!address3.visible = false forms!frmdetails!label39.visible = false forms!frmdetails![contact no].visible = false forms!frmdetails!label112.visible = false forms!frmdetails!combo113.visible = false forms!frmdetails!label113.visible = false forms!frmdetails!cbostatus.visible = false forms!frmdetails!cmdsave.visible = false forms!frmdetails!cmdprint.visible = false end sub
Comments
Post a Comment