Page 1 of 1

Default Field Values

Posted: Mon 22 Mar 2010 17:03
by swright
Hello,
Is it possible when adding a new record usin TMSTable or TMSQuery for fields to be populated with default values.

eg.

Table.Open;
Table.Insert
FieldDefault := Table.FieldByName('A Field With Default').AsInteger;

This would allow bound checkboxes etc to show default rather than empty null etc.

thanks

Posted: Tue 23 Mar 2010 07:13
by Dimon
To solve the problem set the TCustomMSDataSet.Options.DefaultValues property to True.

Posted: Tue 23 Mar 2010 08:58
by swright
Many Thanks