Adam,
For some reason I get a Type Mismatch error (13). Why would this be.
The VBA code, slightly modified is:
Dim amtcost As Variant
mydate = Forms![Medical]!VisitDate
xprovider = Forms![Medical]!Provider
amtcost = DLookup("sumamt", "qry_transSumByDate", "[tdate] =" & mydate And...