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

Prompt For Unknown Parameter in WHERE

Status
Not open for further replies.

ijitnoin

Programmer
Jan 26, 2006
18
US
Please Help!
In Access, you could enter an unknown parameter in the criteria and you will be prompted to enter the unknown value. The following is a sample WHERE:
WHERE (((qryBatchMFGInvoiceSum.MFG) = [Enter MFG Number, 5 positions]) AND ((qryBatchMFGInvoiceSum.MinOfInvoiceDate)
>= [Enter Beginning Invoice Date, 8 positions] AND (qryBatchMFGInvoiceSum.MinOfInvoiceDate) <= [Enter Ending Invoice Date, 8 positions])

The [Enter xxx] would cause a prompt and tell the user what you are looking for. Does SQL Server allow this in any way?
 
If you want to do that create a stored procedure with input variables. Then create a form in your user interface that asks for the inputs and use those values to create the execution string for the stored procedure.

Questions about posting. See faq183-874
Click here to help with Hurricane Relief
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top