J
JohnE
I have a main form (FormA). On it is a tab control with a
subform on it (SubformA). In the subform is a button that
opens a popup form (PopA) with all the states to select
from. On the popup form is a button that is to transfer
the selected states from the popup form to a textbox on
the subform. I keep getting an error of recognition of
the field. Here is what I have. It hangs on the last
line.
Dim varItem As Variant, strStates As String
For Each varItem In Me.lstStates.ItemsSelected
If strStates = "" Then
strStates = Me.lstStates.ItemData(varItem)
Else
strStates = strStates & vbCrLf &
Me.lstStates.ItemData(varItem)
End If
Next
Form![SubformA].[States] = strStates
Anyone see what I'm missing? I have changed around and
added the main form info but is still stops at the last
line.
Thanks in advance for any assistance.
*** John
subform on it (SubformA). In the subform is a button that
opens a popup form (PopA) with all the states to select
from. On the popup form is a button that is to transfer
the selected states from the popup form to a textbox on
the subform. I keep getting an error of recognition of
the field. Here is what I have. It hangs on the last
line.
Dim varItem As Variant, strStates As String
For Each varItem In Me.lstStates.ItemsSelected
If strStates = "" Then
strStates = Me.lstStates.ItemData(varItem)
Else
strStates = strStates & vbCrLf &
Me.lstStates.ItemData(varItem)
End If
Next
Form![SubformA].[States] = strStates
Anyone see what I'm missing? I have changed around and
added the main form info but is still stops at the last
line.
Thanks in advance for any assistance.
*** John