【发布时间】:2019-08-07 07:40:51
【问题描述】:
无法将值on unload 设置为其他表单字段。如果该字段未绑定,则值设置正确,当我在表单中为特定字段设置字段控制属性时,unload 事件无法在其他表单字段中设置值说
错误 3032,无法执行此操作。
unload 事件代码如下:
Dim oItem As Variant
Dim sTemp As String
Dim iCount As Integer
iCount = 0
If Me![SelectTenant].ItemsSelected.Count <> 0 Then
For Each oItem In Me![SelectTenant].ItemsSelected
If iCount = 0 Then
sTemp = sTemp & Me![SelectTenant].ItemData(oItem)
iCount = iCount + 1
Else
sTemp = sTemp & mstrSep & " " & Me![SelectTenant].ItemData(oItem)
iCount = iCount + 1
End If
Next oItem
Else
MsgBox "Nothing was selected from the list", vbInformation
Exit Sub 'Nothing was selected
End If
Forms!TenantAssign![Tenant].Value = sTemp
End Sub
任何帮助将不胜感激。
【问题讨论】: