View Single Post
  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Assumption: you've filtered your database to extract the 25 records that you
want to display. (You can use the autofilter method and visiblecells
property to get those records and read them into an array.)

When the "Next" button is clicked, simply read from that extract using
indices that are 5 higher than previously, or 5 lower for the "Previous"
button. Store the current index in a variable, and you're all set.

HTH,
Bernie
MS Excel MVP


"jophy j via OfficeKB.com" wrote in message
...

In a worksheet around 500 records are there -Employee number,employee
name,
Joining date

I need to display 5 records on the form depending on the date criteria.
Let's
say Joining date from 1st jan 05 to 30th Jan 05. There are 25 records
satisfying this criteria and need to dispaly in 5 records at a time on the
form. Once I click on the next button it should show next 5records
satisfying
this criteria, Same sa if i click on the previous button it should display
the previous 5 records which satisfying this criteria.

I have created 20 textboxes on the form like
Sr EMP# EMP-NAME JOIN-DT
textbox1 textbox2 textbox3 textbox4
textbox5 textbox6 textbox7 textbox8
textbox9 textbox10 textbox11 textbox12
textbox13 textbox14 textbox15 textbox16
textbox17 textbox18 textbox19 textbox20

<NEXT BUTTON <PREV BUTTON

Please help me to find the solution for this .


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...l-new/200507/1