Hi Julio,
I'm not sure I fully understand your problem!!
If you add a module to your project and declare a structure:
Option Explicit
'Record Structure
Public Type employeerecord
empname(10) As String
empnumber(10) As String
empjob(10) As String
End Type
In your code block add:
Dim emprecord as employeerecord
Dim counter as Integer
counter = 0
sqlstring = "select employee, number, job from employees where employee = '" & cTemp & "'"
Set rstRecordSet = conconnection.Execute(sqlstring)
While Not rstRecordSet.EOF
If Not IsNull(rstRecordset!employee) Then emprecord(counter).empname = rstRecordset!employee
If Not IsNull(rstRecordset!number) Then emprecord(counter).empnumber = rstRecordset!number
If Not IsNull(rstRecordset!job) Then emprecord(counter).empjob = rstRecordset!job
If Not rstRecordset.EOF Then
rstRecordset.MoveNext
counter = counter + 1
End If
Wend
This should loop thru your recordset and find every occurence of your search criteria person and put their details in a structure which can be looped thru.
The thing I dont understand is why the same person would be in your database twice with different jobs???
Hope this helps,
Bob
Enter your message below
Sign in or Join us (it's free).