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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selective listings in a Report

Status
Not open for further replies.

sdlewis

Technical User
Oct 18, 2001
16
0
0
US
I have a Report that several people access. When they pull up the report, I want them to have to enter their name, and then show only those things which are assigned to them. There are two fields within the Report which need to be checked for the name, Event Assignee and Rem Assignee. How might I go about doing this?
 
I would add a name parameter to the underlying query driving the report and then use this as the criteria for the field that it relates to.
 
Jitter, I think that is a good idea if there is only one parameter but sdlewis says there are two. Then he/she would have to enter the name twice. I think it would be better to create a combo box of the names and have the user select the name and click on a button to run the report. In the code to run the report add the condition that the name in the two fields equal the name in the combo box. Make sure you use OR instead of AND if you want it to give you records where the name is in either field. Dawn
 
How do I put a combo box in a pop-up?
 
how about creating an expression field in the query which is made up of both fields, and then using a InStr() Function do the Prompting and the Checking

This example is the Criteria Line for an expression field made up of FirstName and LastName Fields, and the [Enter Name] is the Parameter that will Pop Up on the screen for the User to enter the data.

InStr([firstname] & [lastname],[Enter Name])>0

PaulF
 
I'm sorry, I don't know what I was thinking. This is a report. Can you have a pop-up box come up when the user opens a report? Ideally, they would open the report, be propmted for their name, and then returned the items pertaining to them. Can that all be done from the report?
 
Yes if you follow Jitter's advice above, put a parameter in the query underlying the report.

If you put in - Like "*" & [Enter your name] & "*" in the criteria for the name field, it will prompt users for a name. By concatinating in the * it allows for the user to just type a few letters of their name. If you want you can take it out and just put in the [enter your name part]

Replace "enter your name" with any phrase that prompts users for the name.

Dawn
 
That all worked great. Thank you all very much. I've been the one in my group tasked with developing some new databases, so I'm sure I'll have more questions later, but thank you for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top