Dim 变量名 As WinForm.DropDownBox = Forms("采购计划登记").Controls("供货单位")
Dim 变量名 As WinForm.DropDownBox = Forms("采购计划登记").Controls("结算单位")
Dim r As Row = Tables("单位选择_Table1").Current
For Each frm As WinForm.Form In Forms
Select Case frm.Name
Case "采购计划登记"
For Each ctl As WinForm.Control In e.Form.Controls '遍历所有控件
If TypeOf ctl Is WinForm.DropDownBox Then '如果此控件是RadionButton(单选框)
Dim rdo As WinForm.DropDownBox = ctl
Forms("采购计划登记").Controls("rdo").Value = r("单位名称")
Forms("单位选择").Close()
End If
Next
End Select
Next
DropDownOpening
展开下拉窗口前执行。
可以在这里对下拉窗口进行设置。
Dim 变量名 As WinForm.DropDownBox = Forms("采购计划登记").Controls("供货单位")
Dim 变量名 As WinForm.DropDownBox = Forms("采购计划登记").Controls("结算单位")
Dim Val As String = e.Form.DropDownBox.Text
'Dim r As Row = Tables("单位选择_Table1").Current
For Each ctl As WinForm.Control In e.Form.Controls '遍历所有控件
If TypeOf ctl Is WinForm.DropDownBox Then '如果此控件是RadionButton(单选框)
Dim r As Row = Tables("单位选择_Table1").Current
' Dim 变量名 As WinForm.ComboBox = Forms("采购计划登记").Controls("供货单位")
Val = r("单位名称")
' = True '则选中此单选框
Exit For
End If
Next
下拉窗口可以显示,赋值没有改成功,麻烦老师帮忙改下谢谢!