Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Help

Status
Not open for further replies.

markk85

Technical User
Nov 22, 2005
40
GB
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
 
You need to create a query that selects users who have an option of tennis. You would build this query in the query design window and then use it for your report. It will be quite easy, if you have a normalized database.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top