brett_hinman
Sep 24 2008, 08:48 AM
I'm trying to use the 1st column of data from a combo box on a form as my criteria in a query. This is what I was trying to use but I get an error message "Undefined function".
[forms]![frmHO_UndWorksheet]![Combo58].Column(0)
Any suggestions?
Thank you in advance.
Brett Hinman
GroverParkGeorge
Sep 24 2008, 08:57 AM
Perhaps this is too obvious, but is the form open when the query runs?
Another thought is that generic names like combo58 make troubleshooting more difficult than it needs to be in many cases. It's preferable to name controls to reflect their actual content. Here's how it might look.
Forms!frmHO_UndWorksheet!cboStructure.Column(0)
Finally, I assume you've placed this in the criteria row of the query, below the field name on which you want to filter the results?
George
brett_hinman
Sep 24 2008, 09:05 AM
Thank you for the quick response George. I found a posting shortly after I submitted mine that said you cannot reference a column using the Forms collection. They suggested using a hidden textbox that refers to the combo box. I tried it and it works great.
UA Post Thank you again for your response.
Brett