![]() |
spinbutton In Form
Hello €“
In my form resides a combobox, spinbutton and labels. Initializing the form populates the combobox with unique IDs. Selecting an ID filters that records detail to another location wherein the forms labels then display said detail. Due to size constraints the form can only display one record at a time and its field headings. All is well until I try to set the max value of the SpinButton1. If I directly set its max property to 8, it does not stop incrementing after 8 clicks. If I use this found code, same issue. Private Sub SpinButton1_SpinUp() With SpinButton1 .Min = 0 .Max = 3 .Value = .Max End With Range("RowLocal").Value = Range("RowLocal").Value + 1 PopulateFields End Sub What Im trying to accomplish is the following. From the filtered data I get a count of records. That count is what I want to fix the max scrolling to. As the spinbutton clicks up or down, the respective record detail displays in the form. I dont want the spinbutton to go beyond the count of filtered records displaying blanks. Control can be tricky€¦ Sincerely, Arturo |
spinbutton In Form
Assming the max and min values have already been set:
Private Sub SpinButton1_SpinUp() Range("RowLocal").Value = SpinButton1.Value PopulateFields End Sub -- Regards, Tom Ogilvy "Arturo" wrote: Hello €“ In my form resides a combobox, spinbutton and labels. Initializing the form populates the combobox with unique IDs. Selecting an ID filters that records detail to another location wherein the forms labels then display said detail. Due to size constraints the form can only display one record at a time and its field headings. All is well until I try to set the max value of the SpinButton1. If I directly set its max property to 8, it does not stop incrementing after 8 clicks. If I use this found code, same issue. Private Sub SpinButton1_SpinUp() With SpinButton1 .Min = 0 .Max = 3 .Value = .Max End With Range("RowLocal").Value = Range("RowLocal").Value + 1 PopulateFields End Sub What Im trying to accomplish is the following. From the filtered data I get a count of records. That count is what I want to fix the max scrolling to. As the spinbutton clicks up or down, the respective record detail displays in the form. I dont want the spinbutton to go beyond the count of filtered records displaying blanks. Control can be tricky€¦ Sincerely, Arturo |
All times are GMT +1. The time now is 11:13 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com