Hi
I am having a bit of a problem with this VBA code. I am trying to set visibility for a subform. I have used a column in my table which has a tick mark if the form should be visible. I think my problem lies in calling the actual subform as it is a subform in a subform in a tab control on a mainform. If I do this with just a mainform and a subform it works perfectly.
This is the code I am using on the tickbox on the mainform which uses the active column in the table:
If Me.Active = True Then
Me.frmSubRetailResponsibilities01.Visible = True
Else
Me.frmSubRetailResponsibilities01.Visible = False
End If
This is also used on the mainform On Current event.
When I open the form I get the following Compile error message: Method or data member not found.
I have tried this too which has the all form names and the Control box name too and is also not working:
If Me.Active = True Then
Me.frmRetailTracking_Hub.TabCtl58.Page59.frmSubTracking_Hub01.frmSubRetailResponsibilities01.Visible = True
Else
Me.frmRetailTracking_Hub.TabCtl58.Page59.frmSubTracking_Hub01.frmSubRetailResponsibilities01.Visible = False
End If
Any help will be greatly appreciated.
Thanks
Regards
Mark
I am having a bit of a problem with this VBA code. I am trying to set visibility for a subform. I have used a column in my table which has a tick mark if the form should be visible. I think my problem lies in calling the actual subform as it is a subform in a subform in a tab control on a mainform. If I do this with just a mainform and a subform it works perfectly.
This is the code I am using on the tickbox on the mainform which uses the active column in the table:
If Me.Active = True Then
Me.frmSubRetailResponsibilities01.Visible = True
Else
Me.frmSubRetailResponsibilities01.Visible = False
End If
This is also used on the mainform On Current event.
When I open the form I get the following Compile error message: Method or data member not found.
I have tried this too which has the all form names and the Control box name too and is also not working:
If Me.Active = True Then
Me.frmRetailTracking_Hub.TabCtl58.Page59.frmSubTracking_Hub01.frmSubRetailResponsibilities01.Visible = True
Else
Me.frmRetailTracking_Hub.TabCtl58.Page59.frmSubTracking_Hub01.frmSubRetailResponsibilities01.Visible = False
End If
Any help will be greatly appreciated.
Thanks
Regards
Mark