14406.html

来自「VB技巧问答10000例 VB技巧问答10000例」· HTML 代码 · 共 22 行

HTML
22
字号
<html>
  <head>
    <title>How to pass argument using by Combo Box?</title>
  </head>
  <body bgcolor="#FFFFFF" vlink="#808080">
    <center>
      <h1>How to pass argument using by Combo Box?</h1>
    </center>
<hr size=7 width=75%>

<hr size=7 width=75%><p>
Posted by <a href="mailto:96483824@uxmail.cityu.edu.hk">Fai</a> on June 19, 1999 at 09:34:31:<p>
I have problem about how to pass argrument using by Combo Box. I have written some command as follows<p>Private Sub Form_Activate()<br>...<br>Call BrowseField(Form2, cboDocuType, "MPM", "TitleCode")<br>...<br>End Sub<p>Public Sub BrowseField(objForm As Form, cboBox As ComboBox, TableName As String, FieldName As String) ***<br>...<br>If Not Table.EOF Then<br>objForm.cboBox.AddItem Table.Fields(0)<br>Table.MoveNext<br>End If<br>...<br>End Sub<p>However, VB post message "User-define typed not define" at ***.<br>I have try to change "ComboBox" type into "Object" that cause another<br>error "Object doesn't support this property or method".<br>Please tell me how to correct this. Thank you very much!!! <p>
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 14406-->
</ul><!--end: 14406-->
<br><hr size=7 width=75%><p>

</body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?