[AccessD] A2K Reference the dot column property in a query

Rocky Smolin - Beach Access Software bchacc at san.rr.com
Thu Sep 4 22:50:56 CDT 2003


I know there must be a solution to this problem but I've never figured it
out.  Whenever I run into the problem of referencing a form value in a query
I always make a public function like:

Public Function GetComboValue
    GetComboValue=Forms!frmMyForm!cmbMyCombo.Column(2)
End Function

Then in the query you can put GetComboValue() and it will return the value.

Seems there should be a better way though.

Rocky

----- Original Message ----- 
From: "Darren DICK" <d.dick at uws.edu.au>
To: "AccessD List" <AccessD at databaseadvisors.com>
Sent: Thursday, September 04, 2003 8:34 PM
Subject: [AccessD] A2K Reference the dot column property in a query


> Hello all
> In VBA the code to reference certain columns in a combo box on a form
is...
> Forms!frmMyForm!cmbMyCombo.Colum(2)  - Cool it all works
> But when I use the same syntax in a query I get errors - namely
> Undefined function '[Forms]!frmMyForm!cmbMyCombo.Column' in expression
>
> What should I type to reference a particular column of a combo in a query?
>
> Many thanks in advance
>
> Darren
>
>
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>



More information about the AccessD mailing list