Sorry for the stupid question. This is my first database build using VBA (but I'm intermediate with Excel VBA).
I've had a look on google & here but I'm not sure of the right words to be able to ask the question to find it.
I have a form with a sub form inside it which is several fields from a much larger table.
I can open the form & the data is being displayed, but I want to filter the subtable to only show certain entries on opening. IE those that are "Current" in the "Status" field. Currently the subtable shows all the records.
Code:
Private Sub BTN_Current_Click()
DoCmd.OpenForm "Current", , , "Status = 'Current'"
End Sub
My assumption is that I need to add the name of the subform (named "Current - Grid Subform") in front of "Status = 'Current'" but I cant find a code snippet to show me the syntax.
Thanks in advance