Change subform to DataEntry view and back again

MCLEOD

New member
Local time
Yesterday, 22:42
Joined
Jan 23, 2009
Messages
8
Hi...

I've searched, but have not quite found what I'm looking for... I have a form "QC_Form" and its subform "QC_Log". I'd like to be able to have the option to set the subform into data entry mode (so all of the current/previous entries are hidden and new ones can be entered), and then turn the filter off so that all the records are viewed.

I've tried frankensteining some code together, attached to a check box on my main form (check box is NULL_LOG).

Private Sub NULL_LOG_AfterUpdate()
If NULL_LOG = True Then
Me.t_QC_sub_log.Form.DataEntry
Me.t_QC_sub_log.Requery

ElseIf NULL_LOG = False Then
Me.t_QC_sub_log.Requery

End If

End Sub

However, i get an error saying "invalid use of property"... Any help would be greatly appreciated.

Thanks,
Matt
 
The DataEntry property needs to be set to True or False.
 
Ahhh.. yes! I knew it was something simple, thank you!

Here's the final code for anyone that may need it:

Code:
Private Sub NULL_LOG_AfterUpdate()
    If NULL_LOG = True Then
        Me.t_QC_sub_log.Form.DataEntry = True
    
    ElseIf NULL_LOG = False Then
        Me.t_QC_sub_log.Form.DataEntry = False
    
    End If
    
End Sub
 

Users who are viewing this thread

Back
Top Bottom