如何解决这个错误? [英] How to fix this error ?
问题描述
如何修复此错误。我正在设置这样一个数据列表:数据列表截图这里
我有这样的表格:
+ ------------------- +
| --- ID ---- | --- NAME-- |
+ ------------------- +
| --- 101 --- | --- CNN --- |
| --- 102 --- | --- BBM --- |
+ ------------------- +
在datalist上我使用ID作为listfield。当我从listfield中选择ID列表时,我想直接在文本框中显示名称。
例如:我在datalist中选择ID 101,然后在textboxname中显示CNN
How do I fix this error. I am setting a datalist like this: data list screenshot here
And I have table like this:
+-------------------+
|---ID----|---NAME--|
+-------------------+
|---101---|---CNN---|
|---102---|---BBM---|
+-------------------+
On the datalist I am using ID for listfield. I want show the name directly in the textbox when i choose ID list from listfield.
e.g. : i choose ID 101 in datalist then show CNN in textboxname
Private Sub DataList1_Click()
Txtnama.Text = DataList1.ListField = "nama"
End Sub
问题:文本框只显示false。我该如何修复此代码。请帮帮我
谢谢
vb6
我是什么尝试过:
Problem: the textbox just shows "false". How do I fix this code. please help me
thanks
vb6
What I have tried:
Private Sub DataList1_Click()
Txtnama.Text = DataList1.ListField = "nama"
End Sub
推荐答案
为什么它会显示其他东西。
why it sould display something else.
DataList1.ListField = "nama" '---> False
Txtnama.Text = False
也适用于下一个错误......列名.... 姓名
或 nama
? :)
为什么在2017年使用VB6(1998),现在已经接近20岁了。只需下载VS2017 Comunity,免费
also for the next Error ... the column name.... Name
or nama
? :)
why use VB6(1998) in 2017, thats near 20 years old now. just download VS2017 Comunity, its free
这篇关于如何解决这个错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!