Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
jophy j via OfficeKB.com
 
Posts: n/a
Default display set of records in a form with previous and next button


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
  #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



  #3   Report Post  
jophy j via OfficeKB.com
 
Posts: n/a
Default


Thanks Bernie Deitrick, But it would be appreciate , if you could send the
VBA code for this !

Regards
jOPHY

Bernie Deitrick wrote:
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

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

[quoted text clipped - 20 lines]

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
  #4   Report Post  
jophy j via OfficeKB.com
 
Posts: n/a
Default


Can anybody give VBA code for this ?
Jophy

jophy j wrote:
Thanks Bernie Deitrick, But it would be appreciate , if you could send the
VBA code for this !

Regards
jOPHY

Assumption: you've filtered your database to extract the 25 records that you
want to display. (You can use the autofilter method and visiblecells

[quoted text clipped - 13 lines]

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to display single database records into forms for printing need help Excel Discussion (Misc queries) 1 July 6th 05 01:42 AM
Deleting specific records [email protected] Excel Discussion (Misc queries) 6 June 22nd 05 11:35 PM
How do I display records using a key field in Excel? Vic from Texas Excel Worksheet Functions 1 March 1st 05 10:16 PM
In Excel how can a number automatically display in text form Curtis A Excel Worksheet Functions 2 February 26th 05 11:31 AM
A "previous" button on a user form Anthony Slater Excel Discussion (Misc queries) 3 November 29th 04 05:57 PM


All times are GMT +1. The time now is 01:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"