firebirdta84
Technical User
I have a table called EMPL_STATS with 30 records in it - each record contains two fields - [EMPL_NAME] and [NUM_COMPLETED]. In a seperate table (tbl_All_Pending_Cases), I have an evergrowing list of records - each record is an "assignment" for the employee. This table is updated via a form. When an assignment is marked complete on the form, the field [ASSIGN_COMPLETE] changes to a "Yes" value and a field [COMPLETE_DATE] is populated with the date of completion. tbl_All_Pending_Cases has a field called [EMPLOYEE] which contains the employee name. This Here's what I need:
A form called frm_Analysts_Eval with two textboxes ([txtStartDate] and [txtEndDate]) so the user can enter a date range. I want to display all 30 records from EMPL_STATS in this form at the same time. When I click a button, I want it to populate each [NUM_COMPLETED] field with the number of assignments that are assigned to that person and marked complete. Below is some code that someone on this board helped me with, but I guess I would somehow need to remove "John Doe" and replace it continuously with a new employee's name:
DCount("*", "[tbl_All_Pending_Cases]", "[Partner] = 'John Doe' AND [COMPLETE_DATE] Between #" & Format([Forms]![frm_Analysts_Eval]![txtStartDate],"yyyy/mm/dd") & "# And #" & Format([Forms]![frm_Analysts_Eval]![txtEndDate],"yyyy/mm/dd") & "#")
I am fairly new to Access so any help will be appreciated!
Joe
A form called frm_Analysts_Eval with two textboxes ([txtStartDate] and [txtEndDate]) so the user can enter a date range. I want to display all 30 records from EMPL_STATS in this form at the same time. When I click a button, I want it to populate each [NUM_COMPLETED] field with the number of assignments that are assigned to that person and marked complete. Below is some code that someone on this board helped me with, but I guess I would somehow need to remove "John Doe" and replace it continuously with a new employee's name:
DCount("*", "[tbl_All_Pending_Cases]", "[Partner] = 'John Doe' AND [COMPLETE_DATE] Between #" & Format([Forms]![frm_Analysts_Eval]![txtStartDate],"yyyy/mm/dd") & "# And #" & Format([Forms]![frm_Analysts_Eval]![txtEndDate],"yyyy/mm/dd") & "#")
I am fairly new to Access so any help will be appreciated!
Joe