I am using the following code (got from Access Template) in a Command Button to view / hide columns in a Form:
Private Sub cmdShowHideColumns_Click()
On Error GoTo cmdShowHideColumns_Click_Err
DoCmd.RunCommand acCmdUnhideColumns
cmdShowHideColumns_Click_Exit:
Exit Sub
cmdShowHideColumns_Click_Err:
MsgBox Error$
Resume cmdShowHideColumns_Click_Exit
End Sub
I want to place the Command Button on the Main Form & View or Hide columns in the Subform. Is it possible? And if so how I should modify the code.
Regards,
Alex
?