ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   display set of records in a form with previous and next button (https://www.excelbanter.com/new-users-excel/36404-display-set-records-form-previous-next-button.html)

jophy j via OfficeKB.com

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

Bernie Deitrick

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




jophy j via OfficeKB.com


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

jophy j via OfficeKB.com


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


All times are GMT +1. The time now is 03:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com