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!

Input Parameters - All Inclusive Record

Status
Not open for further replies.

jph0810

MIS
May 25, 2007
4
0
0
US
I have a database that contains employee information. Each employee belongs to a Business Unit and that Business Unit is described by a number and name. For example: 12345678 and Human Resources. I'm using Access Project and my tables are stored on an SQL Server. I have stored procedures. One procedure builds a table for these Business Units by selecting the distinct values from my employee table. I have entered a union statement to insert an "ALL" record into the Business Unit table with a record 99999999 for the BU number and * for the BU name. However when I run a query and reference the ALL record, my query is not returning any rows. I'm thinking it is because no one actually has 99999999 as their business unit number. To select the Business Unit I have an Input Parameter defined as the choice in a combo box on a form. How do I define the Input Parameter to recognize the 99999999?
 
A starting point (SQL snippet):
WHERE ([your field]=[your parameter] OR [your parameter]=99999999)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Unfortunately that didn't work. It is still returning zero rows. However if I choose a named Business Unit, the query returns valid rows for that Business Unit.
 
Perhaps the BoundColumn of the combo is the BU name ?
WHERE ([your field]=[your parameter] OR [your parameter]='*')

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top