PDA

View Full Version : Excel database - Userform doesn't work out



CydMM
08-14-2015, 08:40 AM
Hi guys,
I really hope you will be able to help me with my project since I don’t succeed to let it work the way it is supposed to.
My project is to create a Userform able to Search/Edit/Cancel Records of a database I created in an Excel Worksheet.
As you may see from the attached file, I already built up the Userform and the code that should let this application work but, it simply doesn’t work.
My intention is to let the user see results of his textual query on a listbox, and after double clicking on one of the results provided, the record itself is added to the userform, to each pertaining control inside it.
The listbox shows only some of the columns in the database, but once the user selects any of the records shown, naturally the procedure shall populate each control on the userform with the pertaining data.
The user has also other functions available, like editing existing records, deleting any of them but the userform doesn’t work out.
I spent a lot of time creating the code, starting from some templates I found on the Web, with pieces of code I gathered and modified, edited in order to adapt to my project.
Would you please help me fix the mistakes I am unable to find out?
Thank you in advance

SamT
08-15-2015, 09:56 AM
Using Debug>>Compile only found one error.

I would suggest that you use Filter Unique and use SpecialCells Visible for the Values of the Agents ComboBox. This will keep the Userform working even if someone forgets to update the RowSource lists when agernts change.