Split form search

jackie77

Jackie
Local time
Today, 20:36
Joined
Jul 18, 2007
Messages
85
Hi all :o
I now finally managed, with the forums help, to successfully adapt and use (very slowly due to my lack of experience)some search code kindly placed on the forum by Gromit. What I am looking to do now is place the search in another one of my forms. I have access 2007 and the form a split form with the form on top and the data sheet on the bottom, the problem is I am not sure how to adapt the code to instead of looking up a sub form (ie Me.frmsubClients example below) it searches the split form

Original code:

Code:
Private Sub Search_Click()
    ' Update the record source
    Form.Search_Job.RecordSource = "SELECT * FROM Search_Job " & BuildFilter
    ' Requery the subform
    Form.Search_Job.Requery
End Sub

My current code which I am trying to adapt:
Code:
Private Sub btnSearch_Click()
    ' Update the record source
    Me.frmsubClients.Form.RecordSource = "SELECT * FROM qryClientData " & BuildFilter
    ' Requery the subform
    Me.frmsubClients.Requery
End Sub

Can anyone help? :confused:

Thanks
Jackie
 
Sorry the codes are the wrong way round! the code I am trying to adapt is on top and the orginal code by Gromit is the bottom one!
 
anyone out there?
 

Users who are viewing this thread

Back
Top Bottom