Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to display single database records into forms for printing | Excel Discussion (Misc queries) | |||
Deleting specific records | Excel Discussion (Misc queries) | |||
How do I display records using a key field in Excel? | Excel Worksheet Functions | |||
In Excel how can a number automatically display in text form | Excel Worksheet Functions | |||
A "previous" button on a user form | Excel Discussion (Misc queries) |