+ Reply to Thread
Results 1 to 26 of 26

Show Search results in userform and edit

  1. #1
    Registered User
    Join Date
    12-06-2008
    Location
    UK
    Posts
    58

    Show Search results in userform and edit

    Good Evening all,
    I am currently working on an excel document that has a search function. As things have progressed it has become evident that i need the search function to search for a name, show all the information on a userform which then allows the user to edit the information in the userform and resave it over the original

    Is this something thats possible? I have tried to acheive this myself but struggling so any help would be appreciated.

    The user may also need to search for something within the description, so i need to be able to allow the user to select which person it is before they edit it.

    I have attached a basic version of the one i am working on. The one i have is a little more advanced,however this will allow people to practice :D

    Thanks in advance everyone
    Attached Files Attached Files
    Last edited by cruiser102; 05-18-2010 at 09:49 AM.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Show Search results in userform and edit

    Hi cruiser102

    Your workbook appears to be password protected.

    John
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    12-06-2008
    Location
    UK
    Posts
    58

    Re: Show Search results in userform and edit

    Oops, Sorry All!! The access password is 4444

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Show Search results in userform and edit

    So is the VBA Project

    There's no data to test with

    What'snot working in the Search Form?

    Write results to a ListBox then select items to edit,see the DatabaseForm here

    http://excel-it.com/vba_examples.htm
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Registered User
    Join Date
    12-06-2008
    Location
    UK
    Posts
    58

    Re: Show Search results in userform and edit

    Sorry again!
    The access to the workbook is 4444 and the VBA Code password is 3918.

    I have left all data out of the sheet so any willing assisters can put in their own.

    I have a search function already which returns to a seperate worksheet within the database. However, i would really like to have the search information returned to a userform so that the user can ammend the data and resave it if required.
    It is often that the information will be stored on a person but we will need to add further information into the description area, Currently we have to scroll through approx 600 names to find the right person to edit information on the data sheet.

    Again, sorry for not advising the passwords.

    Roy, I have looked at the link you provided, however it says that the amend function on the worksheet cant work and comes up with 'Debug'

    regards
    MArk

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Show Search results in userform and edit

    Not sure what you mean,the userform example works fine.

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Show Search results in userform and edit

    Hi cruiser102
    I'm tied up for a few days working on my son's new house. If this isn't answered when I'm free, I'll look into it for you.
    John

  8. #8
    Registered User
    Join Date
    12-06-2008
    Location
    UK
    Posts
    58

    Re: Show Search results in userform and edit

    Still not having much luck with this.
    With all due respect Roy, i cant get this to work on my PC from your site.

    I need to have my search results returned to a userform so i can edit them and resave.

    Proving to be a difficult one! Losing my hair over it! lol

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Show Search results in userform and edit

    Why is it not working,what errors are you getting? There's been literally thousands downloaded & used

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Show Search results in UserForm and edit

    Hi cruiser102

    I've used royUK's referenced J & R Database Form on several projects and it's worked quite well. Of course, I've modified it to suite my requirements.

    The attached workbook contains a highly simplified version of his code but it does this
    i would really like to have the search information returned to a UserForm so that the user can amend the data and resave it if required
    This simplified code does NOT look for multiple surnames such that if you have three Smith's in your data file, it will find the first and modify it accordingly. This, of course, can be dealt with. royUK's referenced J & R Database Form contains code and Userforms to do just that.

    To address this need
    It is often that the information will be stored on a person but we will need to add further information into the description area, Currently we have to scroll through approx 600 names to find the right person to edit information on the data sheet.
    I'll need more information and examples of what you're looking for. Your best bet is to upload actual examples of what you have so we can look at the data.

    You may wish to look at his suggested code and user forms to make them work for you. If you like, I can pursue this further with you to help you adapt his code to your needs.

    Let me know.

    John
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    12-06-2008
    Location
    UK
    Posts
    58

    Re: Show Search results in userform and edit

    Gents,
    Thanks for your help.
    That is great, i will work with that. Thanks again.

    If i get stuck i will shout

    Thanks all

  12. #12
    Registered User
    Join Date
    12-06-2008
    Location
    UK
    Posts
    58

    Re: Show Search results in userform and edit

    Hi Jaslake,
    Sorry, I am struggling again. I cant seem to get my head around this.

    Sorry for sending you this again, i am struggling with this search option return.

    Basically what i am trying to do is search the data using the specific criteria in my search function. Once i have searched the data i want it to enter the list of possible search matches to a listbox within a userform.

    Once they have been returned i want the option to be able to click on the relevent record in the listbox and be given the option to amend/change the description within the already saved data. Once the users have added/amended the data they can press save and it will auto save it back into the original place on the data worksheet.

    My current search form is available by choosing the search tab at the bottom and pressing the button on that worksheet (Red)
    I have attached another form with data in it.
    Attached Files Attached Files

  13. #13
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Show Search results in userform and edit

    Hi cruiser102

    OK, I think I have a better idea of what you're looking for. Can't guarantee I can help. Let me study this and see if I can figure it out. I'll get back to you ASAP.

    John

  14. #14
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Show Search results in userform and edit

    The workbook & VBA Project are protected

    Is this what you want?
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    12-06-2008
    Location
    UK
    Posts
    58

    Re: Show Search results in userform and edit

    Hi Roy,
    Thanks thats what i am after, i just need to know how to amend a specific record from the listbox now.. Without having to go find it in the data sheet.

    Ideally, i would click on the required name in the listbox that is populated from the search and this would then bring up another form or something or take me to the entry on the data sheet where i can amend the information.


    Thanks guys for your help so far, really appreciated

  16. #16
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Show Search results in userform and edit

    Hi cruiser102

    I think the attached does as you requested.

    John
    Attached Files Attached Files

  17. #17
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Show Search results in userform and edit

    I've added some code to amend the selected details
    Attached Files Attached Files

  18. #18
    Registered User
    Join Date
    12-06-2008
    Location
    UK
    Posts
    58

    Re: Show Search results in userform and edit

    Gentleman! You are brilliant!!

    Thanks very much for your efforts on this, both are superb! That gives me a brilliant example to use on my database!

    Thanks again for your help!

    Regards
    Mark

  19. #19
    Registered User
    Join Date
    12-06-2008
    Location
    UK
    Posts
    58

    Problem with VBA Search

    Hello All,
    Some time ago i put on a post about problems with my search function within my excel sheets. I have only just had time to get back on here and put on a copy of the book i am working on.


    The Problem:
    When searching i wish to search part words on all the options, IE, If a name is stored as a surname of Smith, i would like it to appear if i searched for SM

    The same with the notes, if i wish to search all the notes for a specific word, such as Bike, i would like each relevent entry to be returned to the search form.

    Would one of you kind people be able to point me in the right direction please.

    Regards
    Mark
    Attached Files Attached Files

  20. #20
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Problem with VBA Search

    Was the other post not solved,if not then "bump" it

  21. #21
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Problem with VBA Search

    Hello Mark,

    You should repost the workbook without the VBA Project protected. Wasn't a barrier for me, but most anyone else would give up and refuse to help you any further.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  22. #22
    Registered User
    Join Date
    12-06-2008
    Location
    UK
    Posts
    58

    Re: Problem with VBA Search

    Hi,
    Firstly, - I searched for the older post to 'Bump' it back to the top, but unfortunately couldnt locate it, hence starting a new one. (Hope this is ok?)

    Secondly, It doesnt appear to be protected the VBA on the workbook on the one i thought i had uploaded - I have uploaded another one below which should definately be unprotected.

    Look forward to hearing from all you intelligent people

    Regards
    Mark
    Attached Files Attached Files

  23. #23
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Show Search results in userform and edit

    Threads merged.

    To find past posts, go to you public profiile, statistics tab.
    Entia non sunt multiplicanda sine necessitate

  24. #24
    Registered User
    Join Date
    12-06-2008
    Location
    UK
    Posts
    58

    Re: Show Search results in userform and edit

    Do we have any helpers out there?

  25. #25
    Registered User
    Join Date
    02-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Show Search results in userform and edit

    Hi this file NameNo Data (2 is great a huge help to me, just 1 question if I could ask. Does anyone know how to get this code to bypass the 10 column ListBox value. I am using the as my base code but I have 21 columns of data and the code just wont return more then 10 columns of data to the ListBox

  26. #26
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Show Search results in userform and edit

    @StartingOut,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    HTH
    Regards, Jeff

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1