A
alan_mitchell
Hi,
I have a Form_1 which contians Subform_1.
Subform_1 appears in datasheet view and displays a the number of actions for
each staff member.
So the fields are:
Staff_Name (text)
Action_Count (number)
Now suppose Joe.Bloggs had 26 actions and Paul.Smith had 35.
If a user clicks on the cell which displays number 26, I want to run Query_1
which shows actions for Joe.Bloggs only.
If a user clicks on the cell which displays number 35, I want to run Query_1
which shows actions for Paul.Smith only.
I know how to use DoCmd.OpenQuery to run the query but am stuck how I would
use DoCmd.ApplyFilter to filter for each staff member.
I'm thinking it should be something like:
DoCmd.OpenQuery "Query_1", acViewNormal, acEdit
DoCmd.ApplyFilter , "[Staff_Name]= "the staff_name which corresponds to the
action_count the user clicked on" "
Any ideas how I could reference the staff_name which corresponds to the
action_count the user clicked on?
Cheers,
Alan
I have a Form_1 which contians Subform_1.
Subform_1 appears in datasheet view and displays a the number of actions for
each staff member.
So the fields are:
Staff_Name (text)
Action_Count (number)
Now suppose Joe.Bloggs had 26 actions and Paul.Smith had 35.
If a user clicks on the cell which displays number 26, I want to run Query_1
which shows actions for Joe.Bloggs only.
If a user clicks on the cell which displays number 35, I want to run Query_1
which shows actions for Paul.Smith only.
I know how to use DoCmd.OpenQuery to run the query but am stuck how I would
use DoCmd.ApplyFilter to filter for each staff member.
I'm thinking it should be something like:
DoCmd.OpenQuery "Query_1", acViewNormal, acEdit
DoCmd.ApplyFilter , "[Staff_Name]= "the staff_name which corresponds to the
action_count the user clicked on" "
Any ideas how I could reference the staff_name which corresponds to the
action_count the user clicked on?
Cheers,
Alan