using the Column(1) propery in query critera

rede96

Registered User.
Local time
Today, 23:53
Joined
Apr 2, 2004
Messages
134
Hi,

I am trying to set the criteria in a query, referencing a control on a form. The control is a combo box and I am trying to use the second column to filter data in the query.
EG. Forms!FromName!ComboBox.Column(1)

However the query doesn't accept it. I get an error saying:

Undefined Function 'Forms!FromName!ComboBox.Column' in expression.

How do I reference the control properly please.

Thanks
Red
 
What I would od is
1) create label1 on form
2) place VBA code on ComboBox_AfterUpdate() like this
label1.Caption=ComboBox.Column(1)
3) Use expression in your query like Forms!FromName!Label1.Caption
 
Thanks IgorB, thats not a bad idea.

Cheers
Red
 

Users who are viewing this thread

Back
Top Bottom