+ Reply to Thread
Results 1 to 4 of 4

Searching Database Using Textbox on Userform

  1. #1
    Registered User
    Join Date
    02-11-2014
    Location
    Dublin
    MS-Off Ver
    Excel 2003
    Posts
    2

    Searching Database Using Textbox on Userform

    Hello VBA experts

    I have been looking over the many posts in relation to this type of function but I cannot get any of the examples I've found to work for me.

    Problem:

    I have created a form that will add new records to a database. On the database there is a predetermined ticket number. The "Create" form looks for the first blank row and adds the information on the form the database.

    What I am trying to make happen is when a "Ticket Number" is entered in the approriate field on the "edit" form, the "Date Raised" and "Raised By" fields populate based on the information stored on the row for the ticket number enter.

    I have attached a simplified version of my workbook. If you have any questions please let me know.

    Many Thanks

    Cian
    Attached Files Attached Files
    Last edited by CianScarborough; 02-12-2014 at 07:41 AM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Searching Database Using Textbox on Userform

    Try in code of your userform something like:
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    02-11-2014
    Location
    Dublin
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Searching Database Using Textbox on Userform

    That worked perfectly, thank you Kaper.

    Have you any idea on how I would create a save button that updates the database if new data is entered in either field?

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Searching Database Using Textbox on Userform

    Exactly the same way shall work equally well

    Just instead of

    Please Login or Register  to view this content.
    use
    Please Login or Register  to view this content.
    and of course change the procedure name to reflect Button name

    After writing both values you may want to notify user that values were updated and ask "what next" :-P

+ 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. Replies: 3
    Last Post: 05-07-2012, 09:46 PM
  2. Userform Textbox Searching
    By sparx in forum Excel General
    Replies: 8
    Last Post: 02-26-2012, 03:42 PM
  3. Need help searching worksheet for userform textbox values
    By bsweet0us in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-16-2011, 10:57 AM
  4. Userform Textbox updating a another userform textbox (im stuck!!)
    By wapwap in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-31-2011, 02:56 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