A form or report RecordSource can be table or query or a query that joins tables/queries. A field constructed by expression in query can be the ControlSource of a textbox. As long as field is in the RecordSource it is available to the ControlSource property. Set ControlSource to a constructed field same way as to any field.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Wow! The most weird thing just happened... with the query created and working, i copied the code:
into the control source of the Age Field in the form and voila... It does exactly what i wanted.DateDiff("yyyy",[DateOfBirth],Date())-IIf(Format([DateOfBirth],"mmdd")>Format(Date(),"mmdd"),1,0)
Now the Age field on my form updates as soon as a date of birth is entered into the DateOfBirth field!