Feeding a top records query

  • Thread starter Thread starter marcusjb
  • Start date Start date
M

marcusjb

Apparently this is a tough one because I've posted it in two other
forums with no answer.

I want to be able to let the user enter the quantity in a form that
will return the top records in a query rather than have a static number
set to the query.

I realize that this will need to be done in code, but I don't know how
and no one else's attempts at explaining it have worked.

Thanks in advance!!!!
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

== begin air code ==

dim strSQL as string

strSQL = "SELECT TOP " & Me!txtTopNumber & " * FROM TableName"

' Open a recordset or save to a QueryDef's .SQL property & run query.

== end air code ==

MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQDZOiYechKqOuFEgEQLxpwCdGvF/6iNiNfr/uOovYEVg+gj46wYAoNrw
n02inD3B397eQyhjpahOxcLk
=8xyx
-----END PGP SIGNATURE-----
 
Thank you for responding to this, I've just noticed two months later
Sorry so long.

Where would be the appropriate place to put this code
 
Thank you for responding to this, I've just noticed two months later
Sorry so long.

Where would be the appropriate place to put this code
 
Thank you for responding to this, I've just noticed two months later
Sorry so long.

Where would be the appropriate place to put this code
 
Thank you for responding to this, I've just noticed two months later
Sorry so long.

Where would be the appropriate place to put this code
 
Back
Top