The arguments to DMax() (and all the domain functions) must be text strings:
the first the name of a field, the second the name of the Table or Query
containing that field, and the (optional) third argument a valid SQL WHERE
clause (without the WHERE keyword) specifying which record in the table/query.
However, your dMax expression does not do what your intro specifies. If you
really want to set the default value to 15 minutes after the maximum CntTime,
you could use:
Private Sub txtCntTime_AfterUpdate()
If Not IsNull(Me!txtCntTime) Then ' only set default if a value exists
Me!txtCntTime.DefaultValue = Chr(34) & _
Format(DateAdd("n", 15, Me!txtCntTime), "hh:nn") & Chr(34))
End If
End Sub
This assumes that CntTime is a pure time value such as 10:35; if it's a date
and time value, use a Format of "yyyy-mm-dd hh:nn".
Note the suggestions in my .sig - this forum was killed off by Microsoft
several years ago, and exists only in the dark underworld of Usenet Zombie
Newsgroups. This is the first post I've seen here in some months.
--
John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://answers.microsoft.com/en-us/office/forum/access?tab=question&status=all
http://social.msdn.microsoft.com/Forums/office/en-US/home?forum=accessdev
and see also
http://www.utteraccess.com