I am trying to change the recordsource of a form from another form. When the user clicks on the name of the client in the first form, second form should be displayed about the client which was chosen in the first form.
When I try to run this, it says 'it cannot find the frmclientssearchsub2 in the list of forms.
and highlights the
ource = strsql
I suspect the syntax should be different.
Private Sub ClientName_DblClick(Cancel As Integer)
Dim strsql As String
Dim strwhere As String
strsql = "Select * From Assets"
strwhere = "1"
If Not IsNull(Me.Form.ClientName) Then
strwhere = strwhere & " AND LastName= '" & Me.Form.ClientName & "'"
Me!frmClientsSearchSub2.Form.RecordSource = strsql