Results 1 to 2 of 2

Thread: stop adding data[Resolved]

  1. #1

    Thread Starter
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    stop adding data[Resolved]

    I'm call this sub in commandbutton , my problem is when user clicks it more than 1 click , data is added again (duplicated) .How can stop this ?
    I thought of diabling the button but I don't want this way .
    (I can't remember how could I did it in VB6 )

    VB Code:
    1. Public Shared Sub LoadColumns(ByRef listbox As ListBox)
    2. Dim var As New Variables()
    3. Dim str As String
    4. var.MyAdapter.Fill(var.MyDataset, "MyTab")
    5.  
    6. Dim fields(var.MyDataset.Tables(0).Columns.Count - 1) As DataColumn
    7. var.MyDataset.Tables(0).Columns.CopyTo(fields, 0)
    8. listbox.Items.AddRange(fields)
    9. End Sub
    Last edited by Pirate; Feb 24th, 2003 at 07:38 PM.

  2. #2

    Thread Starter
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    Talking

    Got it resolved !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width