Hello All,
I have a button on a form that populates a list box on the finding of a recortset.
'Start of process ...
Dim DB as Database
Dim SName as String
Dim rstOne As Recordset
Set DB = CurrentDb
SName = "Joe Bloggs"
Set rstOne = Db.OpenRecordset("Select FullName, Supervisor from tblUser where Supervisor = '" & Sname& "' "
Me.Listbox1.RowSource = ("Select Fullname, Supervisor from tblUser where Supervisor = '" & rstOne("Fullname"
& "' "
'End of process ...
The problem is when this runs the Listbox only contains data for one of the records found within rstOne!
I need to show all the records that are found within the rstOne recordset that match the supervisor and show them within the listbox.
Do I loop ... if i do how do I append the records into the Listbox ... ???
I am fairly new to VBA so I could do with some guidance ...
Tiny Perfection is Everything
If it worked first time we wont be here!
I have a button on a form that populates a list box on the finding of a recortset.
'Start of process ...
Dim DB as Database
Dim SName as String
Dim rstOne As Recordset
Set DB = CurrentDb
SName = "Joe Bloggs"
Set rstOne = Db.OpenRecordset("Select FullName, Supervisor from tblUser where Supervisor = '" & Sname& "' "
Me.Listbox1.RowSource = ("Select Fullname, Supervisor from tblUser where Supervisor = '" & rstOne("Fullname"
'End of process ...
The problem is when this runs the Listbox only contains data for one of the records found within rstOne!
I need to show all the records that are found within the rstOne recordset that match the supervisor and show them within the listbox.
Do I loop ... if i do how do I append the records into the Listbox ... ???
I am fairly new to VBA so I could do with some guidance ...
Tiny Perfection is Everything
If it worked first time we wont be here!