+ Reply to Thread
Results 1 to 3 of 3

Adding data through a userform

  1. #1
    Registered User
    Join Date
    06-08-2010
    Location
    NY, NY
    MS-Off Ver
    Office 2003, Office 2007
    Posts
    18

    Adding data through a userform

    Hi there,

    i am having a problem with my userform. I am working on a master inventory list and hit a roadblock. I am filling in ten textboxes on a user form and when the add button is clicked the inventory group verifies that something is selected. that works fine. then it compares the id field with column 2 to check for matching values. if matching values are found a mcgbox appears and tells the user to ammend instead of adding, if no mathching value is found it then does the same for the serial # entered and cloumn 3 with the same results, if no match found it adds the data to the form.

    The problem i am having is this if the id field or serial # field is left blank it says there is a matching value found. is there a way i can get it to not match a blank userform text box and a blank cell and also if someone enters lets say a 1 in the userform id field it will say there is a match it finds every cell with a 1 in it even if it is part of a longer string. Why is this? how can i get it to match exactly what is entered into the textbox
    thank you for all your help

    Please Login or Register  to view this content.
    Attached Files Attached Files

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

    Re: Adding data through a userform

    Isn't this the same problem

    http://www.excelforum.com/excel-prog...e-entries.html
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    06-08-2010
    Location
    NY, NY
    MS-Off Ver
    Office 2003, Office 2007
    Posts
    18

    Re: Adding data through a userform

    i was able to update the code so that it adds the data. now i am having a problem where it determines that is a 1 is inputted into the usertextbox it matches any 1 in the column.

    i guess it is the same problem, but i have added code that seemed to get me further along .

    sorry if this is repetative

+ 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