Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 06-13-2009, 07:34 AM
LilyMarie LilyMarie is offline
Registered User
 
Join Date: 26 Feb 2009
Location: U.S
MS Office Version:Excel 2003
Posts: 42
LilyMarie is becoming part of the community
Show first 50 records using VBA

Please Register to Remove these Ads

Hi all,



I have a query that selects all staff. I would like to change it to 3 or 4 separate queries.....one that shows the 1st through the 50th record, the next that selects the 51st through the 100th record, etc.

Is this possible?
Reply With Quote
  #2  
Old 06-14-2009, 01:17 AM
ConneXionLost's Avatar
ConneXionLost ConneXionLost is offline
Valued Forum Contributor
 
Join Date: 11 Mar 2009
Location: Victoria, Canada
MS Office Version:2003
Posts: 576
ConneXionLost is attaining expert status ConneXionLost is attaining expert status
Re: Show first 50 records using VBA

Hi LilyMarie,

Not a complete answer for you. Switch your query to SQL view and change it from:

SELECT ...

to:

SELECT TOP 50 ...

This will give you the first 50 records.

- - - -

Beyond that you'll need to select the staff by their IDs or build a sort column in the staff table.

Cheers,
__________________
Docendo discimus.
Reply With Quote
  #3  
Old 06-15-2009, 07:13 AM
LilyMarie LilyMarie is offline
Registered User
 
Join Date: 26 Feb 2009
Location: U.S
MS Office Version:Excel 2003
Posts: 42
LilyMarie is becoming part of the community
Re: Show first 50 records using VBA

Thanks for your reply but i need the programmatic solution.So that i can solve my problem.
Reply With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump