I'm trying to change the DisplayControl of a boolean (YesNo) field to acCheckBox, with no success :banghead:
here is a piece of my code
I tried both acCheckBox and 106 with the same result.
I have no problem, using similar code changing the field's other properties like Format, Description, Required and DefaultValue, but DisplayControl will not be changed and stay as TextBox
*** The field has a "True/False" Format.
I can manually change it if I go into the BE db.
:banghead::banghead::banghead:
Thanks
Tal
here is a piece of my code
Code:
boo = False
For i = 0 To DataDB.TableDefs("MyTable").Fields("MyYesNoField").Properties.Count - 1
If DataDB.TableDefs("MyTable").Fields("MyYesNoField").Properties(i).Name = "DisplayControl" Then
boo = True
End If
Next i
If boo = False Then ' -- Append the "DisplayControl" property to field if not already exist
Set newPrp = DataDB.TableDefs("MyTable").Fields("MyYesNoField").CreateProperty("DisplayControl", dbInteger, acCheckBox)
DataDB.TableDefs("MyTable").Fields("MyYesNoField").Properties.Append newPrp
End If
DataDB.TableDefs("MyTable").Fields("MyYesNoField").Properties("DisplayControl").Value = acCheckBox
I have no problem, using similar code changing the field's other properties like Format, Description, Required and DefaultValue, but DisplayControl will not be changed and stay as TextBox
*** The field has a "True/False" Format.
I can manually change it if I go into the BE db.
:banghead::banghead::banghead:
Thanks
Tal
Last edited: