Reputation: 579
Unable to set value on unload
to other forms field. If the field is unbound then the value set properly and when I set the filed control property in the form for the specific field then unload
event unable to set value in the other form field says
error 3032, cannot perform this operation.
unload
event code below:
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
Any help would much be appreciated.
Upvotes: 0
Views: 471
Reputation: 55981
This indicates, that the field bound to Forms!TenantAssign![Tenant]
cannot accept the value or type of sTemp
.
Also note, that when you have corrected this and the code will run without an error, Forms!TenantAssign
will be left Dirty.
Upvotes: 0