Using combo box Column property in a query

aziz rasul

Active member
Local time
Today, 01:15
Joined
Jun 26, 2000
Messages
1,934
I want to use the value in the second column of a combo box on a form for the criteria in a query. What syntax do I use? I have tried:-

[Forms]![frmChallenges]!cboProvider.Column(1)
Like [Forms]![frmChallenges]!cboProvider.Column(1)

but it doesn't like it.
 
you could try:
Code:
Public Function GetComboValue() As String
    GetComboValue = [Forms]![frmChallenges]!cboProvider.Column(1)
End Function
then put this as your criteria (with parentheses):
GetComboValue()
 
You can't use columns in a query. It doesn't work. You can set a text box to be the value of the combo column and then reference that text box in the query.
 
Thanks both. Tried the text box route which of course worked.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom