R
Roger
I am attempting to do a record count on a column in a
subform. When I use the DCount, I retrieve the total
number of records from the table the subform is based on.
If I use the Count function, I get only the number of
records present in the subform column. Unfortunatly I
cannot use the Count function because I want to exclude
certain values from the count. Here is how my form is set
up:
Main form is FA Schedule, contains employee name and ID
number from the employee table. Subform is frmSchedule,
contains employee schedule information from the Schedule
table. The fields in this table are Time,
Sunday....Saturday.
When I use =DCount("[Monday]","[Schedule]","[Monday]
Between 1 and 700")in a textbox located in the subform
form footer I return 21 records for Monday, which is true
if I want the number of records for all employees. But in
this case I only want the number of records for the
current employee displayed, so the number should actually
be 11.
Any suggestions on how I can remedy this problem will be
appreciated. Although I am novice at this, I am not
adverse to using VB or VBA to accomplish my goal. Thank
you,
subform. When I use the DCount, I retrieve the total
number of records from the table the subform is based on.
If I use the Count function, I get only the number of
records present in the subform column. Unfortunatly I
cannot use the Count function because I want to exclude
certain values from the count. Here is how my form is set
up:
Main form is FA Schedule, contains employee name and ID
number from the employee table. Subform is frmSchedule,
contains employee schedule information from the Schedule
table. The fields in this table are Time,
Sunday....Saturday.
When I use =DCount("[Monday]","[Schedule]","[Monday]
Between 1 and 700")in a textbox located in the subform
form footer I return 21 records for Monday, which is true
if I want the number of records for all employees. But in
this case I only want the number of records for the
current employee displayed, so the number should actually
be 11.
Any suggestions on how I can remedy this problem will be
appreciated. Although I am novice at this, I am not
adverse to using VB or VBA to accomplish my goal. Thank
you,