Darren DICK
d.dick at uws.edu.au
Thu Sep 4 23:35:30 CDT 2003
Thanks Rocky and Joshua Yes That's what I have done - Put a hidden control on the form and referenced that. Even though your/my way works, I just thought there must be a 'real' way to do it. Thanks heaps for responding guys Darren ----- Original Message ----- From: "Joshua B" <lists at jbsolutions.com.au> To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Sent: Friday, September 05, 2003 2:29 PM Subject: Re: [AccessD] A2K Reference the dot column property in a query > > 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 > > > > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com