94Sport5sp
Registered User.
- Local time
- Today, 12:37
- Joined
- May 23, 2012
- Messages
- 115
Hi:
I have a Combo Box on a form populated with a query from which the user selects a value. In my code I would like to get the item selected. It is my understanding that ItemsSelected and ItemData would work for this purpose but when coded I get a "compile error Method or Data Member not found" and I cannot figure out why.
I looked on here for sample code and on the net and this is the code (code is in OnExit event) I came up with
If Me.cbRegister.ItemsSelected.Count > 0 Then
' Do some processing
Else
' Display error message
End If
When I switch to form view and select a value from the combo box, On exit the compile error is triggered with .ItemsSelected highlighted. What am I missing?
Thanks
I have a Combo Box on a form populated with a query from which the user selects a value. In my code I would like to get the item selected. It is my understanding that ItemsSelected and ItemData would work for this purpose but when coded I get a "compile error Method or Data Member not found" and I cannot figure out why.
I looked on here for sample code and on the net and this is the code (code is in OnExit event) I came up with
If Me.cbRegister.ItemsSelected.Count > 0 Then
' Do some processing
Else
' Display error message
End If
When I switch to form view and select a value from the combo box, On exit the compile error is triggered with .ItemsSelected highlighted. What am I missing?
Thanks