+ Reply to Thread
Results 1 to 14 of 14

vba search and move next record and previous record

  1. #1
    Registered User
    Join Date
    04-04-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    89

    vba search and move next record and previous record

    I have the master data of all clients. I want to create it in Label format. Pfa the sample file.
    Attached Files Attached Files
    Last edited by cpramesh; 02-20-2017 at 10:09 PM.

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: vba search and move next record and previous record

    Something like this? Why a search button the name is a dropdownlist
    Attached Files Attached Files
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Registered User
    Join Date
    04-04-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: vba search and move next record and previous record

    Yes, i need in that format. If i search anything like name or company or address, i need details in the label format.

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: vba search and move next record and previous record

    It now works with the name. You select a name you get the data.
    Alternative is write a macro to do what the formulas do when either one of the opther fields is entered to search.

  5. #5
    Registered User
    Join Date
    04-04-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: vba search and move next record and previous record

    Ok it is working but I need like pressing Arrow control button to move next and previous record too.

  6. #6
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: vba search and move next record and previous record

    So what you really need is a full macro code to do that?
    Any VBA knowledge?
    Are you using prior to Excel 2007 version?

  7. #7
    Registered User
    Join Date
    04-04-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: vba search and move next record and previous record

    i have little bit knowledge in VBA. Using Excel 2007 version

  8. #8
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: vba search and move next record and previous record

    So why are you saving the file as an older version (xls?)
    I've saved the file in the correct format and changed the macros
    The first column of Sheet1 is a dynamic named range named 'NAMES' you can add a new name and it will appear in the Data Validation in Sheet2 B2
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    04-04-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: vba search and move next record and previous record

    excellent, my requirement is searching of name or company or city like that.

  10. #10
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: vba search and move next record and previous record

    Will see if I can change it.
    Will require some coding and time.

  11. #11
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: vba search and move next record and previous record

    If you ask these type of thing you should keep in mind that you have to be able to do your own maintenance; I would suggest you start some VBA basics too.

  12. #12
    Registered User
    Join Date
    04-04-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: vba search and move next record and previous record

    I have the knowledge to modified coding but need to learn more

  13. #13
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: vba search and move next record and previous record

    I did it this way.
    Search on all other fields would require an extra choice because they occur more than once.
    I placed dropdownlists in all fields, select one and the first occurrence is shown, with the arrow you can navigate all from there.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    04-04-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: vba search and move next record and previous record

    Thank you very much. It works fine.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Previous & Next record on criteria
    By sanjuss2 in forum Excel General
    Replies: 6
    Last Post: 09-19-2015, 02:39 AM
  2. simple macro to add new record, edit/ search and print record
    By xmoore in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-28-2015, 08:10 PM
  3. userform Help (Search, Modify, Delete and Move a Record)
    By anuji.de.silva in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-03-2013, 09:20 AM
  4. [SOLVED] userform Help (Search, Modify, Delete and Move a Record)
    By jason_kelly in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-02-2013, 01:46 PM
  5. Replies: 1
    Last Post: 11-16-2012, 09:25 AM
  6. Command Buttons for Viewing Record, Next Record and Previous Record
    By david1987 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-23-2012, 06:30 AM
  7. auto populate a record based upon a value in previous record.
    By leewcrawford in forum Access Tables & Databases
    Replies: 4
    Last Post: 04-07-2009, 11:41 AM

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