I made an advanced userform example .
Really it's many features .
- Data Adding
- Data Delition
- Data Update
- Searching with The Userform
- Progress Bar Feature
- Scrolling the Listbox with Spin Buttons
- Next ,Previous ,First ,Last Recording Buttons
- Sheet Hide / Show Features with Toggle Button
On the worksheet tab named Input Master there is a button that will take you to the Input Form at the bottom of the Form there are 4 command buttons.
Add Record - is working fine and when you fill in the form and click the button it adds a new record to the Input Master worksheet on the next available row then closes the form
Search Record - is not programmed - I would like this button when clicked to open a search function that would allow you to find records that already exist
Update Record - is not programmed - I would like to be able to update a record that already exists by clicking this button - I do not want to create a new record when this is clicked just update the existing record with any changes/additional information that was input on the form
Close Form - is working fine when clicked it closes the form
Open userform, enter data in userform, click on "Find Record".
A sheet will be made visible with all the records with the same ClientLN or Coach.
On this sheet (Search results) there are 2 buttons: Update and Cancel.
Cancel: Remove search results, hide sheet and return to "Input master" sheet.
Update: First select the cell or row that you wish to update (this is also what the button tells you) and click the "Update" button.
A message box appears if you didn't select a valid record.
A message box appears displaying the selected record and the record initially entered in the userform.
This is to confirm the update action. So either click on Cancel to stay on sheet and possibly choose another record to replace or click on OK. This will update (basically replace) the record on the "Input Master" sheet.
The only way to leave the "Search results" sheet is to use the buttons.
Note that the "Update" button is fully called:
Select row and hit this button to update record in Input Master sheet.
Note that the "Cancel" button is fully called:
Cancel search action.
Finally note that the "Update Record" button on the userform lost it's intended purpose and can be removed if you choose to work with this solution.
Search Record - When does a record already exist? When all the cells column A:S are the same as another row?
Just checking in case you have other thoughts.
How do you see this working? Highlight duplicates, Delete duplicates, ....
Do you want a general search of the sheet or search for the values entered in the userform?
Update Record - How do you visualize this. Do you want users to input a row number and then replace that row with the data entered in the userform? Or ...