gen23
04-14-2004, 09:16 AM
How can I delete an item from a listbox without having to delete the item before it. For example: Within a listbox are apple and orange, how can I delete orange without deleting apple?
Private Sub add_Click()
ado1.Recordset.AddNew
ado1.Recordset.Fields("names") = Trim(Text2.Text)
ado1.Recordset.Update
display
Text2 = Clear
Text2.SetFocus
End Sub
Private Sub cmddelete_Click()
List1.RemoveItem Selected
End Sub
Private Sub Form_Load()
Text1.Text = Format(Date, "mmddyy")
Label1.Caption = Time
List1.Appearance = ado1.Recordset.Fields(0)
End Sub
Private Sub display()
List1.AddItem ado1.Recordset.Fields(0)
End Sub
This is what I've done so far... but I have another problem... I cannot display the content of my database in a listbox.. how can I do that?
Thanks...
Private Sub add_Click()
ado1.Recordset.AddNew
ado1.Recordset.Fields("names") = Trim(Text2.Text)
ado1.Recordset.Update
display
Text2 = Clear
Text2.SetFocus
End Sub
Private Sub cmddelete_Click()
List1.RemoveItem Selected
End Sub
Private Sub Form_Load()
Text1.Text = Format(Date, "mmddyy")
Label1.Caption = Time
List1.Appearance = ado1.Recordset.Fields(0)
End Sub
Private Sub display()
List1.AddItem ado1.Recordset.Fields(0)
End Sub
This is what I've done so far... but I have another problem... I cannot display the content of my database in a listbox.. how can I do that?
Thanks...