How do you DLookup the Default Value of a field in a table.
Me.TxtVal = DLookup("ChkMessage","tblChecks")
Thanks
DS
> How do you DLookup the Default Value of a field in a table.
>
> Me.TxtVal = DLookup("ChkMessage","tblChecks")
You can't do it with DLookup, if I understand what you mean. DLookup can
return only values that actually exist in the table, not values that *might*
be added if someone adds a record without specifying a value for the field.
However, you can do it using DAO:
Me.TxtVal = _
CurrentDb.TableDefs("tblChecks").Fields("ChkMessage").DefaultValue
Bear in mind that the DefaultValue property is a string, and will be a
zero-length string if the field doesn't have a default value.

Signature
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
DS - 31 Jul 2008 20:33 GMT