Michael R Mattys
michael.mattys at adelphia.net
Mon Feb 10 10:36:11 CST 2003
John, Access keeps changing whatever you write in the ControlSource and won't recognize "Column(0)." You should provide yourself with a hidden textbox that has a ControlSource of "= LenCBOCol" and then embed the function in the form. Private Function LenCBOCol() LenCBOCol= Len(cboItemOrdered.Column(0) End Function Mike Mattys Mattys Consulting ----- Original Message ----- From: "John Clark" <John.Clark at niagaracounty.com> To: <accessd at databaseadvisors.com> Sent: Monday, February 10, 2003 11:19 AM Subject: [AccessD] length of combo box choice (shorter version) > I have a combo box, in an A97 form, w/three columns. I want to test the > length of one of these columns for some code that I have. How do I refer > to a specific column in the syntax for the Len function? I used, "If > Len(frmFEDSMain!cboResults.ItemsSelected) > 10 Then" and > "Len([Forms]![frmFEDSMain]![cboResults].[Column](0))" but these do not > work. > > I had used the first syntax origianlly, and it worked. But, I had > forgotten to fill in the control source (I know...stupid), and it quit > working, when I filled this in. > > I also tried a roundabout approach, by putting "chkstring = > [Forms]![frmFEDSMain]![cboResults].[Column](0)" and sticking this > variable into the Len function, but this returns 42 (or whatever the > length of the actual string is). > > Any ideas? > > Thanks! > > John W Clark > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com