|
-
Aug 9th, 2000, 08:30 AM
#1
Thread Starter
Lively Member
listbox
Lets say that your list box can hold 20 characters across and then all characters after that get cut off. So what you could do with your primary key is put that value in position 25 or somthing like that. For example let say your key is '10' you would put this string when adding the item -
list1.additem left$(StringFromTable + space$(24), 24) + yourkey.
So this is only going to show '10 ' and then the primary key is going to be cut off from the list box.
derek
-
Aug 9th, 2000, 10:37 AM
#2
Hyperactive Member
Thanks, but I already got it.
Code:
function query2htmList(myquery,myname,myDSN)
dim conntemp, rstemp
set conntemp=server.createobject("adodb.connection")
conntemp.open myDSN
set rstemp=conntemp.execute(myquery)
query2HTMlist="<Select name='" & myname & "'>"
do until rstemp.eof
thisfield=trim(RStemp(1))
thisid=RStemp(0)
if not isnull(thisfield) or thisfield<>"" then
query2HTMlist=query2HTMlist & "<option value=" & thisid & ">" & thisfield & "</option>"
end if
rstemp.movenext
loop
query2HTMlist=query2HTMlist & "</select>"
rstemp.close
set rstemp=nothing
conntemp.close
set conntemp=nothing
end function
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
|