Hi, I am a beginner and struggling to get to grips with some fundamentals of Access 2007 and VBA. Like the subject says, I am currently trying to hide a column in a sub form without it hiding in the source table. I'm trying a workaround by using VBA to hide the column when the form opens then unhide it when it closes. However I can't even seem to get the Form_Open() procedure working let alone change the columnhidden property. It's starting to drive me crazy so any help would be very welcome! Here's the code I've been trying:
Private Sub Form_Open()
Me.[Child12].[BookNum].ColumnHidden = True
End Sub
I've tried a few configurations of the columnhidden line with the same error each time. Ive also tried simply:
Private Sub Form_Open()
MsgBox ("Form Open!")
End Sub
to debug but get the same error complaining that 'Procedure declaration does not match description of event or procedure having the same name'
I do have a procedure working in the same class module:
Private Sub Check13_Click()
If [Check13] = True Then
[Child12].Enabled = True
Else
[Child12].Enabled = False
End If
End Sub
which is successfully disabling the subform unless a check box is ticked.
Thanks for any advice,
chin chin.
Private Sub Form_Open()
Me.[Child12].[BookNum].ColumnHidden = True
End Sub
I've tried a few configurations of the columnhidden line with the same error each time. Ive also tried simply:
Private Sub Form_Open()
MsgBox ("Form Open!")
End Sub
to debug but get the same error complaining that 'Procedure declaration does not match description of event or procedure having the same name'
I do have a procedure working in the same class module:
Private Sub Check13_Click()
If [Check13] = True Then
[Child12].Enabled = True
Else
[Child12].Enabled = False
End If
End Sub
which is successfully disabling the subform unless a check box is ticked.
Thanks for any advice,
chin chin.