|
-
Jul 30th, 2000, 08:17 AM
#1
Thread Starter
New Member
With the standard Listbox or the Combox controls, it is possible to manually select an item from within list using the ListIndex function.
List1.ListIndex = 1 (or whatever other number).
However, the DataList and the DBList controls seem to lack this function. Is there another way to do it? TIA.
-
Feb 18th, 2002, 04:08 AM
#2
Hi Frosty,
did you find any solution for this ?
I'm looking for exactly the same thing.
Thanks in advance,
Bjorn
-
Feb 18th, 2002, 07:18 AM
#3
Frenzied Member
You can use DataList1.BoundText for that
If you bounding Id (like id=123)
DataList1.BoundText=123
Code:
Db.Execute "delete * from mytable where id=" & Val(DataList1.BoundText)
oh1mie/Vic

-
Feb 18th, 2002, 07:29 AM
#4
but I don't want to delete it or so .... I just want that the first item in the data list is selected.
Thanks in advance !
-
Feb 18th, 2002, 08:56 AM
#5
Frenzied Member
Originally posted by Borry
but I don't want to delete it or so .... I just want that the first item in the data list is selected.
Thanks in advance !
Code:
"select * from mytable where id=" & Val(DataList1.BoundText)
oh1mie/Vic

-
Feb 18th, 2002, 08:58 AM
#6
Frenzied Member
Code:
Private Sub Form_Activate()
Screen.MousePointer = vbDefault
If Not Data2.Recordset.EOF Then
DataList1.BoundText = Data2.Recordset!Id
DataList1_Click
End If
End Sub
oh1mie/Vic

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|