|
4#

楼主 |
发表于 2009-6-29 00:23:28
|
只看该作者
3# Henry D. Sy
我修改了以下的函数并应用到自己的VAB中
===================================
Private Sub tx产品数量_AfterUpdate() ‘tx产品数量为组合框
Dim i As Integer, strList As String
With tx产品数量
For i = 1 To .ListCount
strList = IIf(Nz(strList) = "", "", strList & ";") & .ItemData(i)
Next
If Nz(.Text) <> "" Then
If InStr(1, .Tag, .Text) = 0 Or (原And)InStr(1, strList, .Text) > 0 Then
.Value = IIf(Nz(.Tag) = "", "", .Tag & "★") & .Text
End If
.Tag = .Text
Else
.Tag = ""
End If
End With
End Sub
==============================
作了And改为Or后,。虽然打开时组合框内容为空,重新赋值(更新后),组合框内容为旧值★新值,只能在组合框用回退键,再组合框失去焦点,再赋值,才可组合框内容为新值★新值。
============
Henry D. Sy 老师很久没浮面了
请指教 |
|