List Box and Search Problem

EssexRob

Registered User.
Local time
Today, 18:25
Joined
Jan 30, 2006
Messages
22
Hey all, i have a problem with a search. Its a little confusing:

I have a list box which runs a query displaying jobs.

I want the list to show just the results of the client thats details are currently on screen. e.g. Client 1 may have 10 different jobs. So the list should show the 10 different jobs and when the user clicks on the job, it displays that job.

Basically i have got this part working, the problem is that when i move records the list box does not update e.g. The 1st client displayed is client1 when i click on my command button to move to the next record the list box still shows the results of client1 and not the results for client2.

Thank for any help. This is the code i am using if it is any help to people:

Option Compare Database
Option Explicit

Private Sub List35_DblClick(Cancel As Integer)
On Error GoTo Err_List35_DblClick
Dim rs As Object

'Opens form when double clicked
DoCmd.OpenForm "frm_job"
'Creates a clone of list35 on frm_clientsearch
Set rs = Forms!frm_Job.Recordset.Clone
rs.FindFirst "Job_ID= " & Me.List35
Forms!frm_Job.Bookmark = rs.Bookmark

Exit_List35_DblClick:
Exit Sub

Err_List35_DblClick:
MsgBox Err.Description, , "Advancing Clean Information"
Resume Exit_List35_DblClick

End Sub

Private Sub txtSearchString_Change()
Dim vSearchString As String

vSearchString = Client_ID.Text
search.Value = vSearchString
Me.List35.Requery

End Sub
 

Users who are viewing this thread

Back
Top Bottom