+ Reply to Thread
Results 1 to 5 of 5

implement database search and edit function

  1. #1
    Registered User
    Join Date
    07-09-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    16

    implement database search and edit function

    I have made a sheet for entering marks and roll number database.
    I want to implement search and save function in this sheet..
    In this sheet if we enter number of database it can be shows in respective textbox..
    for example if we enter 1 in the record number textbox....60 marks can be shown in maths mark textbox
    70 can be shown in science marks textbox and so on.
    I have implemented database entering formula in excel sheet through userform but i dont know how to get data from excel sheet to userform and edit/save it.so can anybody help me to coding for this function and as well as save, first record, previous record, next record , and last record button's vba code..!!???
    I have attached my sheet here for reference.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by dharmang1910; 09-15-2013 at 12:15 PM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: implement database search and edit function

    To get the marks , I suggest using the change event on the textrec textbox

    Please Login or Register  to view this content.
    For the next record box, try

    Please Login or Register  to view this content.
    The others follow a similar pattern.
    Martin

  3. #3
    Registered User
    Join Date
    07-09-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: implement database search and edit function

    Thank you mrice very much for your quick reply,,i want to post reply same day but in last two days when i opened this site, the server is down.
    your code works great but there were a problem occur..
    if we delete row number figure from record no text box, an error message displayed...
    so i have add this code into txtrec_Change events
    Please Login or Register  to view this content.
    but after doing this i can't continuously add database through user form , so would you please give me hint for this..???
    i think txtrec must be temporary disabled by vba but then how can we use search function..???

    and i have coded "first record" button, now only "last record" button and "save" buttons are remaining...
    here is the new sheet i've changed according to your help....!!!!
    marks database1.xls

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: implement database search and edit function

    It maybe that Excel already has something very close to what you need.

    Have a look at

    http://spreadsheets.about.com/od/dat..._data_form.htm

  5. #5
    Registered User
    Join Date
    07-09-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: implement database search and edit function

    yes mrice i'm already knowing that,
    but main cons about that method is that you can't remove whole database at once but you have to remove each of the entries one by one by pressing delete button in it
    otherwise there will be a blank database still remains and when you press new button it starts the entering data from where there is last data entered...
    for example if we had added 40 record of marks and roll number and for new test we had deleted old database by selecting old database and pressing delete button..sheet becomes clear but excel starts to enter new database from 41th line instead of 1st one...
    Last edited by dharmang1910; 09-17-2013 at 12:42 PM.

+ 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. Search function in a database
    By silversurfa23 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-26-2013, 06:25 PM
  2. Search & Edit Macro / Function
    By michaelweaver4 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-09-2012, 06:23 PM
  3. Userform search and edit function help
    By adjustermn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-08-2010, 03:35 PM
  4. How can I search Excel database and edit an entry?
    By saziz in forum Excel General
    Replies: 1
    Last Post: 02-08-2006, 04:30 PM
  5. Search & Edit in Excel Database possible?
    By saziz in forum Excel General
    Replies: 3
    Last Post: 02-02-2006, 05:50 PM

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