T
Tastic
Hi,
I am currently working on a database of call centre statistics,
I have a table called Agents which contains the following fields:
[AgentKey] [Agent Name] [Active] [TeamID] plus a couple of others
I have a table called Stats which contains the following fields:
[Date] [AgentKey] and my Stats fields
I am trying to write some code that will create a new record in "Stats"
for each Agent in "Agents" usint [AgentKey] with the conditions that
[TeamID] must be equal to [TeamID] on the form, also [Active] must =
True
I have tried doing this using Do loop with the following code
Let StatsAgent = 0
Do Until StatsAgent = 80
StatsAgent=StatsAgent+1
Me.AgentKey.Value = StatsAgent
DoCmd.GotoRecord,,acNewRec
Loop
I can create a query of active agents by team, but the problem I have
here is that the Agent Keys will not be sequential and so the question
is how do I get the code to create a record for every key listed in the
query
If you can help me with this I will be incredibly grateful
Cheers
I am currently working on a database of call centre statistics,
I have a table called Agents which contains the following fields:
[AgentKey] [Agent Name] [Active] [TeamID] plus a couple of others
I have a table called Stats which contains the following fields:
[Date] [AgentKey] and my Stats fields
I am trying to write some code that will create a new record in "Stats"
for each Agent in "Agents" usint [AgentKey] with the conditions that
[TeamID] must be equal to [TeamID] on the form, also [Active] must =
True
I have tried doing this using Do loop with the following code
Let StatsAgent = 0
Do Until StatsAgent = 80
StatsAgent=StatsAgent+1
Me.AgentKey.Value = StatsAgent
DoCmd.GotoRecord,,acNewRec
Loop
I can create a query of active agents by team, but the problem I have
here is that the Agent Keys will not be sequential and so the question
is how do I get the code to create a record for every key listed in the
query
If you can help me with this I will be incredibly grateful
Cheers