View search progress

beeky

Registered User.
Local time
Today, 04:23
Joined
Jan 11, 2010
Messages
39
I used to be able to set up a text box that allowed the user to view each file or record as a loop search was called. I suppose a bit like when using a registry cleaner it shows each entry as it searches and checks. Can anyone point me to a tutorial that shows this or can advise how I can do it. For example If in my database the user decides to search a table for the sake of argument say its called tbl_Interim_Certificate and I want to show users in a text box the "job_reference" numbers as they looped through the table how do I do this please?
 
Thank you. This looks something like what I am trying to do. I have modified this to:

Code:
Public Function fShowJobReference(lngJob_Reference As Long) As String
On Error GoTo Err_fShowJobReference
'This function shows Job References in a string format

Dim dbs As DAO.Database
Dim snp As DAO.Recordset
Set dbs = CurrentDb
Set snp = dbs.OpenRecordset("qryFinalPayment", dbOpenSnapshot)
snp.MoveFirst

Do Until snp.EOF
If snp![Job_Reference] = lngJob_Reference Then
fShowJobReference = fShowJobReference & IIf(fShowJobReference = "",  "", "; ") & snp!Job_Reference
End If
snp.MoveNext
Loop

snp.Close
dbs.Close

Exit_fShowJobReference:
Exit Function
Err_fShowJobReference:
MsgBox Err.Description, vbCritical, "Error " & Err.Number
Resume Exit_fShowJobReference
End Function

My Text box is called txtShowJobReference and I want the Job Reference to display in the text box when a cmd button is clicked. How do I call the function? I presume I use code in the cmd button and referr to the text box but how do I actually do this please.
 

Users who are viewing this thread

Back
Top Bottom