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

Getting (all) employee to show in report

Status
Not open for further replies.

IFORD

Technical User
Sep 21, 2004
32
US
I have a report that runs off of parameters in a query which is: [FORMS]![frmSalesmanCustomerList]![EMPLNO]on the form the [emplno] is a combo Box if I would like to see information on one employee it is working. But I would like to be able to see (ALL) employees if possible. I can add a (ALL) to the combo Box. But that does nothing for my query. And my report print error.

Thanks Irene
 
You could have some code behind your report's On_Open event that looks at some 'flag' field on your form. If this 'flag' field indicates that your user wants to see all employees, then have the code behind your report act on this and have it change the report's Record Source to a query that doesn't have the single Employee No. in the criteria row, but instead shows all employees.

Hope this helps.
 
Irene,

Check out faq702-4538

I'm CosmoKramer, and I approve this message.
 
Thank you both, but I found that if I change my code on the query to read:

[FORMS]![frmSalesmanCustomerList]![EMPLNO] or [FORMS]![frmSalesmanCustomerList]![EMPLNO]is null

And on the form I leave [EMPLNO] blank I get ALL employees

Thank you both again

Irene
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top