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

Joshua B lists at jbsolutions.com.au
Thu Sep 4 23:29:17 CDT 2003


Rockys way will work just as well as mine, what I have done is to put a hidden text box on the form and make its controlsource = Forms!frmMyForm!cmbMyCombo.Column(2). Then, in the query, instead of referencing the combo, reference the hidden text box...



======= At 2003-09-04, 20:50:00 you wrote: =======

>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
>>
>
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com

= = = = = = = = = = = = = = = = = = = =
			

Best regards.				 
Joshua B
lists at jbsolutions.com.au
www.jbsolutions.com.au
2003-09-05





More information about the AccessD mailing list