Prev: 1.0e to VB6
Next: Creating a Lookup Table
From: Jack Reed on 7 Mar 2010 17:31 I am certain that this is so simple the solution will bring great embarrassment. The simple routine that follows results in a "Type Mismatch" error when the "MS ADO Ext 2.8 for DDL & Security" is selected which it must be for other parts of the app. All I want to do is set (and likely change) some of the grids chracteristics at run time. The datagrid is properly connected to an adodc source and, in fact, the grid fills properly. dim c as column for each c in datagrid1.columns do something next *** Sent via Developersdex http://www.developersdex.com ***
From: Bob Butler on 7 Mar 2010 20:01 "Jack Reed" <reedesigns(a)earthlink.net> wrote in message news:O82M2XkvKHA.4636(a)TK2MSFTNGP06.phx.gbl... > > I am certain that this is so simple the solution will bring great > embarrassment. > > The simple routine that follows results in a "Type Mismatch" error when > the "MS ADO Ext 2.8 for DDL & Security" is selected which it must be for > other parts of the app. All I want to do is set (and likely change) > some of the grids chracteristics at run time. > The datagrid is properly connected to an adodc source and, in fact, the > grid fills properly. > > dim c as column When 2 or more libraries expose objects with the same name VB picks whichever occurs first in the references. You can go to the references dialog and move them around but the best solution is just to be specific: dim c as msdatagridlib.column ' or whichever library you want IMO it's always best to specify even if no conflict exists; it helps make the code more self-documenting and prevents problems if you add a new reference later that has a name conflict.
From: Jack Reed on 7 Mar 2010 22:26 THANKS, Bob! That did the job. I had tried changing the reference priorities but that just caused other problems. This works perfectly. *** Sent via Developersdex http://www.developersdex.com ***
|
Pages: 1 Prev: 1.0e to VB6 Next: Creating a Lookup Table |