Hello.

I am trying to change a RecordSource (query) of a subform based on user selection in another form.

In the code below I am setting the same query as defined on the subform (Property RecordSource), but it returns no records at all.

Code:
Private Sub ID_Click()
    Dim fetchedId As Integer
    Dim sql As String
    With Me.Form.Recordset
        Me.Parent.Form!IdHolder = .Fields("Id")
...