Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

deselect item in datalist

Status
Not open for further replies.

Borracho1

Programmer
Apr 2, 2005
28
BE
Hi

1) How do you deselect an item in a datalist.

2)And is it possible to clear a datalist when adding a new item to a recordset. Because when i add a new record to a recordset the datalist is still showing the values of the previous record until i save or update it.

Thanks
 
So i use this code to add a field to a datalist and it works good when there is no field selected in the datalist.

I used this to remove the selection but then the item is replaced by an empty one, so it isn't really a sollution.

DataList2 = -1

this is my code to add this field.

Dim stra As String

stra = (InputBox("AA", "AA", "dd"))
If stra <> "" Then
newsollicitantid = Data1.Recordset.Fields("sollicitantid")

rsdat.Recordset.MoveLast
rsdat.Recordset.AddNew
rsdat.Recordset.Fields("sollicitantid") = newsollicitantid
rsdat.Recordset.Fields("diploma") = stra
rsdat.Recordset.Update

i thought of using the locked function but this is also not a sollution because i must be able to delete items and therefore i must be able to select the record.

It would be a big help if someone could help me out with this.

thanks
borracho1

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top