Results 1 to 4 of 4

Problem in combobox and textbox

Threaded View

  1. #1
    Valued Forum Contributor abduljaleel.mca's Avatar
    Join Date
    02-13-2013
    Location
    Chennai, India
    MS-Off Ver
    MS 365 Business
    Posts
    326

    Problem in combobox and textbox

    Hi,

    I need to enter a project name in the textbox (Name: txtProjectName) and the entered project name will be automatically stored in the combo box (Named: ProjectNames). No problem in the above steps. The problem is here, it need to show the error if I enter the project name which is previously exist. The below code doesn't work for me


    
    Private Sub cmdOK_Click()
    For i = 0 To ProjectNames.ListCount - 1
        If ProjectNames.List(i).value = txtProjectName.Value Then
            MsgBox "This Project is already exists!", vbInformation
            Exit For
        End If
    Next I
    
    End Sub
    It shows error for each project I enter in the textbox even though the project name doesn't exist already.

    Please help.
    Last edited by abduljaleel.mca; 04-15-2013 at 10:40 AM.

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