F
FredVN
Hi,
I'm an M/S Access newbie who has figured out how to do simple calculations
in a form objects using the control sources for a text boxes, but am having
problems using functions to calculate database values.
Table name is: Medicare Form
It is derived from a query named; Patient query
First I'd like to find the highest value in a field named: mcrec in any of
any records in the database.
I've tried; =Max(mcrec), but that seems to yield the value of mcrec in the
same record.
Second, I'd like to calculate the sum of the values in a field named McDed
for all records in which Serdt had the same year as Serdt in the record
being displayed.
I've tried =DSum("[McDed]","Patient Query", Year(SerDt)=Year("[SerDt]")),
but get a syntax error.
I'd be very appreciative if someone would show me the proper commands and
syntax to use for these calculations.
FredVN
PS in the process of playing with these functions I've done something to the
database that prevents me from entering data in the forms. When I try I get
a "dinging" sound. What did I do and how do I fix it?
I'm an M/S Access newbie who has figured out how to do simple calculations
in a form objects using the control sources for a text boxes, but am having
problems using functions to calculate database values.
Table name is: Medicare Form
It is derived from a query named; Patient query
First I'd like to find the highest value in a field named: mcrec in any of
any records in the database.
I've tried; =Max(mcrec), but that seems to yield the value of mcrec in the
same record.
Second, I'd like to calculate the sum of the values in a field named McDed
for all records in which Serdt had the same year as Serdt in the record
being displayed.
I've tried =DSum("[McDed]","Patient Query", Year(SerDt)=Year("[SerDt]")),
but get a syntax error.
I'd be very appreciative if someone would show me the proper commands and
syntax to use for these calculations.
FredVN
PS in the process of playing with these functions I've done something to the
database that prevents me from entering data in the forms. When I try I get
a "dinging" sound. What did I do and how do I fix it?