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

SELECT TOP X - Can that be variable?

Status
Not open for further replies.

rubbernilly

Programmer
Sep 20, 2005
447
US
I'd like to provide some flexibility to the query, to where the user could decide to pull the TOP 5, TOP 3, TOP 20, whatever.

Using a parameter does not work:

SELECT TOP [Enter Value]...

I figure I can do this by manipulating the SQL of the querydef, but I'd like to just have some straightforward flexibility rather than a lot of backend programming.

Possible?
 
How are ya rubbernilly . . .

I havn't tested parameters in this case, but if it doesn't work, go the VBA route and concatenate an [blue]InputBox[/blue] into the SQL!

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top