Hiding subform

S

swarfmaker

I'm trying to hide a subform unless a tickbox is checked on the parent form.
The following code does not work
Error says "Can't find Field subfrmSessions"

Code Start

Private Sub Form_Current()
If Me!SessionDates = True Then 'checkbox on parent form
Me!subfrmSessions.Visible = True 'subform
Else
Me!subfrmSessions.Visible = False
End If
End Sub

Code End
 
S

swarfmaker

swarfmaker said:
This does not work. Still getting error.

First rule of debugging ................. Check for typos!!!!!!!!!!!

Me!subfrmSession.visible = true 'Note Session not Sessions
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top