I've tried to change the RowHeight property of a new table using the example provided by the Access Help (copied below) but the row height remains unchanged after running the procedure and opening the table in datasheet view, although the property "RowHeight" is correctly assigned a value and appendeded to the other properties.

However, if before running the procedure below the table has the row height manually adjusted and then it is saved, all the following changes done progamatically with the procedure will take effect. Why is this happening?


Set dbs = CurrentDb
Set tdfCustomers = dbs.TableDefs("MyNewTable")
SetTableProperty tdfMyNewTable, "RowHeight", dbLong, 450

Sub SetTableProperty(tdfTableObj As TableDef, strPropertyName As String, _
intPropertyType As Integer, varPropertyValue As Variant)
' Set Microsoft Access-defined table property without causing
' nonrecoverable run-time error.

Const conErrPropertyNotFound = 3270
Dim prpProperty As Property
On Error Resume Next ' Don't trap errors.
tdfTableObj.Properties(strPropertyName) = varPropertyValue
If Err <> 0 Then ' Error occurred when value set.
If Err <> conErrPropertyNotFound Then
On Error GoTo 0
MsgBox "Couldn't set property '" & strPropertyName _
& "' on table '" & tdfTableObj.Name & "'", 48, "SetTableProperty"
Else
On Error GoTo 0

Set prpProperty = tdfTableObj.CreateProperty(strPropertyName, _
intPropertyType, varPropertyValue)
tdfTableObj.Properties.Append prpProperty
End If
End If
tdfTableObj.Properties.Refresh
End Sub