473,473 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Nth select records in the table

2 New Member
Hello,

I need help, I have a table with 13450 records, i need to nth select down to 10,000 records, how do i go about doing this using ms Access/VBA
Nov 13 '14 #1
2 1027
Seth Schrock
2,965 Recognized Expert Specialist
Not exactly sure what you are wanting, but you can select the top x number of records. You would just set your ORDER BY clause to sort the records the way you want and then use
Expand|Select|Wrap|Line Numbers
  1. SELECT TOP 10000 fields
  2. FROM table_name
  3. ORDER BY Your_sort_order
Nov 13 '14 #2
twinnyfo
3,653 Recognized Expert Moderator Specialist
Or.....

If you want records N through 10,000, then after running Seth's query, and first determining what N is, calculate 10,000 - N:

Expand|Select|Wrap|Line Numbers
  1.     Dim intValue As Integer
  2.     Dim strSQL As String
  3.  
  4.     intValue = 10000 - N 'This is just the concept
  5.     strSQL = "SELECT TOP " & intValue & " fields " & _
  6.         "FROM qrySethByQuery " & _
  7.         "ORDER BY Your_sort_order DESC;"
Notice how I switched the sort order.

Hope this hepps!
Nov 13 '14 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: BigD | last post by:
This seems so simple yet I can't figure it out. I have a table that has two important columns for this query. Column A has varchar Column B is datetime All I want to do is select any record...
3
by: William Gill | last post by:
I can't help but think I'm re-inventing the wheel if I have to code my own interface! Isn't there some script, php code, or something (modifiable / customizable) available that lets me select...
13
by: Botao | last post by:
Hi, Every Guru, I'd like to put a button on a page. When clicking the button, the table below it gets selected so the user can do Ctrl C to copy the entire table without using the mouse to...
2
by: Danny | last post by:
How to allow users to select a set of records and then let them change a field for all these records at once? I would like to do this in code on a form. I will have a form with tabular view of...
1
by: arthur-e | last post by:
How can you select records based on more than one combo box - I have a combobox that selects records based on name (I'm sure this has been asked a thousand times - web site answer/link could be...
1
by: Dan Sikorsky | last post by:
How do you select records from one dataset and create a second dataset? I need to pull out the master records from a dataset and create a master datagrid in which to embed a details datagrid (for...
2
by: Hamayun Khan | last post by:
Hi all I am using the following query to select records for table Select JobTitle,JobDesc,Scraped,logoimage,JobPostID,SchoolID,web,MemType,InstitutionName,PayScale,LEA,Contract as...
2
by: rkferguson | last post by:
Hi Folks, I have a table that captures information about documents that leave the office. Some of those documents may get a signature and then return to the office. Need away to query the...
0
by: Gordon Padwick | last post by:
A form contains controls, one or more of which can be other forms. A form that contains another form is known as a main form. A form contained by a main form is known as a subform. A subform itself...
0
by: Elizabeth Mitte | last post by:
Hello, Thank you for the tutorial type article, is proving very useful. However, I have been following your instructions step by step and still get errors with the code? Trying to create the...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.