L
L Magarian
Hello,
I am trying to set the DisplayControl property on a field using DAO in
C#. I've found lots of sample code for VB and am trying to adapt it
for use in C#.
This is the code I'm running now:
DAO.Field f = db.TableDefs[TableName].FieldsÂ[ColumnName];
//110 is list box
DAO.Property p1 = f.CreateProperty("DisplayContrÂol", Type.Missing ,
110, Type.Missing);
f.Properties.Append( p1 );
This is the error:
[COMException (0x800a0d3a): Property 'Value' must be set before using
this method.] DAO.Properties.Append(Object Object) +0
The third parameter in the CreateProperty method is the value, so I
don't know why it's not being set.
Any help figuring this out would be greatly appreciated.
I am trying to set the DisplayControl property on a field using DAO in
C#. I've found lots of sample code for VB and am trying to adapt it
for use in C#.
This is the code I'm running now:
DAO.Field f = db.TableDefs[TableName].FieldsÂ[ColumnName];
//110 is list box
DAO.Property p1 = f.CreateProperty("DisplayContrÂol", Type.Missing ,
110, Type.Missing);
f.Properties.Append( p1 );
This is the error:
[COMException (0x800a0d3a): Property 'Value' must be set before using
this method.] DAO.Properties.Append(Object Object) +0
The third parameter in the CreateProperty method is the value, so I
don't know why it's not being set.
Any help figuring this out would be greatly appreciated.