I have a table called User with the fields:
Name
Option
I want to create a report that will show a list of the names in the table that have selected the option Tennis.
I have started on the code but am a bit stuck as to where to go next:
Dim db As Database
Dim copyofselections As DAO.Recordset
Set db = CurrentDb
Set copyofselections = db.OpenRecordset("User", dbOpenDynaset)
copyofselections.MoveFirst
Do Until copyofselections.EOF
If copyofselections!Option = "Tennis" Then
' This is where I am not sure what to put?
' I want a list of Names to show on the report who have chosen tennis as their option.
End If
copyofselections.MoveNext
Loop
Can anyone help?
Thanks
Name
Option
I want to create a report that will show a list of the names in the table that have selected the option Tennis.
I have started on the code but am a bit stuck as to where to go next:
Dim db As Database
Dim copyofselections As DAO.Recordset
Set db = CurrentDb
Set copyofselections = db.OpenRecordset("User", dbOpenDynaset)
copyofselections.MoveFirst
Do Until copyofselections.EOF
If copyofselections!Option = "Tennis" Then
' This is where I am not sure what to put?
' I want a list of Names to show on the report who have chosen tennis as their option.
End If
copyofselections.MoveNext
Loop
Can anyone help?
Thanks