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

Change predicate value Access query

Status
Not open for further replies.

RandDUser

Technical User
Feb 24, 2005
65
US
I am trying to run a query that will return a set number of records. I have used the sql logic of SELECT TOP 500 which will return the top 500 values. However, I want the user to specify the number of records using an unbound textbox in a form.

I tried the following code:

SELECT TOP [Forms]![Form1]![TextBox1] Table1.Field1 ...

However, it will not except the code, any suggestions?

Thanks.
 
You usually need to build the SQL as a text string and then run it when you want do anything more elaborate than change WHERE, HAVING or ORDER BY clauses.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top