Setting field properties

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an Access database with linked tables to a SQL server

When I want to set properties like "DisplayControl", "RowSource" etc. by using VBA the contents of the following fields are not saved: RowSource, BoudnColumn, ColumnCount and ColumnWidths

All the others ones (e.g. ListRows, ListWidth) are saved

I use the following code
tdf.Fields(strFieldName).Properties.Append db.CreateProperty("BoundColumn", 3, 1
tdf.Fields(strFieldName).Properties.Refres
tdf.Fields(strFieldName).Properties("BoundColumn").Value = intValu

What am I doing wrong

Jeroen
 
After a weekend of further experimenting a found the solution

For each field you have to create and set a GUI
Fill the fieldproperties in this order
- DisplayContro
- Rowsourc
- ColumnCoun
- BoundColum
- ColumnWidth
- LimitToLis

And don't forget to set
- ColumnWidth (beware; no s !!
- ListWidth (value 0 for automatic
- RowSourceTyp
- Columnhead
- ListRow

Hope it works for you

Jeroen
 
Back
Top