Question Top 3

dz2k7

Not only User
Local time
Today, 01:45
Joined
Apr 19, 2007
Messages
104
Hi,

I have a query picking Top 3 of something.

Sometimes I need top 4 or top 8 and this is a part of my adjustments.

All other adjustments are in the form.

I want to make this Top 3 thing as an adjustable parameter and manage the query from the form.

I tried diferent ways, but SQL dosen't take it.

Does anybody have a clue how to manage that?

Thanks.
 
Last edited:
Just a maybe on this one
Basically on your form have a field where you select X. X being 3 or whatever "top" you want
Then a command button with a DoCmd.RunSql event procedure. The rest of the DoCmd string is the SQL but you substitute in X at the appropriate place. Need to declare X as Integer and then make X = Value on form

The sql string will take a bit of sorting out to ensure quotes are in correct place so that it is interpreted correctly.

Maybe ???

Len
 
Hello Len!

Look at "DemoTopNnA2000.mdb" (attachment).
Open Form and try.
Look at VBA.
 

Attachments

Thank you guys a lot!
I think i can go through now.
 

Users who are viewing this thread

Back
Top Bottom