473,434 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

Help assigning leads to salespeople in "Round Robin" fashion!

Bob
I have an Access application where I need to automatically forward
emails to a group of 12 salespeople as soon as they arrive. The first
email needs to go to the first salesperson on the list, the second
email to the second salesperson on the list until I get to the end of
the list, then start over. I also need to be able to exclude
salespeople on their day off. The email portion of the application
will be using a rule in Outlook 2003 that runs a VBA project.

I was thinking of having a table with the salespersons name, email
address and some kind of flag value that I could have my VBA code look
for.. but thats where my lack of experience and knowledge becomes
apparent. I'm especially not sure of how to reset the process and
start over.

Does anyone have any suggestions or examples that may help?

Thank you in advance for any help you might havr!

Bob

Dec 5 '06 #1
4 2394
On 5 Dec 2006 03:36:09 -0800, "Bob" <te*******@bellsouth.netwrote:

When I did something like this, I kept the value of the
EmployeeID_LastSent, so that next time I could go to the one after
that. That was done using rs.Move, with special handling for
end-of-recordset which meant going back to the first record.
In your case the recordset would only hold EmployeeIDs of salespeople
that are present in the office today.

-Tom.

>I have an Access application where I need to automatically forward
emails to a group of 12 salespeople as soon as they arrive. The first
email needs to go to the first salesperson on the list, the second
email to the second salesperson on the list until I get to the end of
the list, then start over. I also need to be able to exclude
salespeople on their day off. The email portion of the application
will be using a rule in Outlook 2003 that runs a VBA project.

I was thinking of having a table with the salespersons name, email
address and some kind of flag value that I could have my VBA code look
for.. but thats where my lack of experience and knowledge becomes
apparent. I'm especially not sure of how to reset the process and
start over.

Does anyone have any suggestions or examples that may help?

Thank you in advance for any help you might havr!

Bob
Dec 5 '06 #2
Bob
Tom,

Thanks for getting back to me so quickly.

I'm not sure if I can do what you're suggesting unless I store the
employee ID in some kind of temp table.

I'm using a VBA project to look at a table and determine the last
person that got mail, then send to the next one. After all of the
people have gotton mail, start over at the beginning. Can you explain
the special handling at the end of the recordset you're describing? Or
a reference to similiar code sample? That's where I seem to be having
the most trouble. I'm not sure if I should use DAO or ADO for my
connection to that table and if I should use Do until EOF or other
options.

Bob
Tom van Stiphout wrote:
On 5 Dec 2006 03:36:09 -0800, "Bob" <te*******@bellsouth.netwrote:

When I did something like this, I kept the value of the
EmployeeID_LastSent, so that next time I could go to the one after
that. That was done using rs.Move, with special handling for
end-of-recordset which meant going back to the first record.
In your case the recordset would only hold EmployeeIDs of salespeople
that are present in the office today.

-Tom.

I have an Access application where I need to automatically forward
emails to a group of 12 salespeople as soon as they arrive. The first
email needs to go to the first salesperson on the list, the second
email to the second salesperson on the list until I get to the end of
the list, then start over. I also need to be able to exclude
salespeople on their day off. The email portion of the application
will be using a rule in Outlook 2003 that runs a VBA project.

I was thinking of having a table with the salespersons name, email
address and some kind of flag value that I could have my VBA code look
for.. but thats where my lack of experience and knowledge becomes
apparent. I'm especially not sure of how to reset the process and
start over.

Does anyone have any suggestions or examples that may help?

Thank you in advance for any help you might havr!

Bob
Dec 5 '06 #3
On 5 Dec 2006 06:02:59 -0800, "Bob" <te*******@bellsouth.netwrote:

Storing the last EmpID in a "temp" table is fine.
DAO is fine when working with Access (better: Jet) database.

dim rs as Dao.Recordset

'Open Recordset

rs.FindFirst "EmpID=" & EmpID_LastSent
if rs.NoMatch then Msgbox "Aaarrcchhh, LastSent was not found!"
else
rs.MoveNext
if rs.EOF then rs.MoveFirst
Msgbox "Next up is " & rs!EmpID
end if

-Tom.

>Tom,

Thanks for getting back to me so quickly.

I'm not sure if I can do what you're suggesting unless I store the
employee ID in some kind of temp table.

I'm using a VBA project to look at a table and determine the last
person that got mail, then send to the next one. After all of the
people have gotton mail, start over at the beginning. Can you explain
the special handling at the end of the recordset you're describing? Or
a reference to similiar code sample? That's where I seem to be having
the most trouble. I'm not sure if I should use DAO or ADO for my
connection to that table and if I should use Do until EOF or other
options.

Bob
Tom van Stiphout wrote:
>On 5 Dec 2006 03:36:09 -0800, "Bob" <te*******@bellsouth.netwrote:

When I did something like this, I kept the value of the
EmployeeID_LastSent, so that next time I could go to the one after
that. That was done using rs.Move, with special handling for
end-of-recordset which meant going back to the first record.
In your case the recordset would only hold EmployeeIDs of salespeople
that are present in the office today.

-Tom.

>I have an Access application where I need to automatically forward
emails to a group of 12 salespeople as soon as they arrive. The first
email needs to go to the first salesperson on the list, the second
email to the second salesperson on the list until I get to the end of
the list, then start over. I also need to be able to exclude
salespeople on their day off. The email portion of the application
will be using a rule in Outlook 2003 that runs a VBA project.

I was thinking of having a table with the salespersons name, email
address and some kind of flag value that I could have my VBA code look
for.. but thats where my lack of experience and knowledge becomes
apparent. I'm especially not sure of how to reset the process and
start over.

Does anyone have any suggestions or examples that may help?

Thank you in advance for any help you might havr!

Bob
Dec 5 '06 #4
Bob
Tom,

Thanks again for your help!

I'll be trying out today and may post more questions later.

Regards,

Bob
Tom van Stiphout wrote:
On 5 Dec 2006 06:02:59 -0800, "Bob" <te*******@bellsouth.netwrote:

Storing the last EmpID in a "temp" table is fine.
DAO is fine when working with Access (better: Jet) database.

dim rs as Dao.Recordset

'Open Recordset

rs.FindFirst "EmpID=" & EmpID_LastSent
if rs.NoMatch then Msgbox "Aaarrcchhh, LastSent was not found!"
else
rs.MoveNext
if rs.EOF then rs.MoveFirst
Msgbox "Next up is " & rs!EmpID
end if

-Tom.

Tom,

Thanks for getting back to me so quickly.

I'm not sure if I can do what you're suggesting unless I store the
employee ID in some kind of temp table.

I'm using a VBA project to look at a table and determine the last
person that got mail, then send to the next one. After all of the
people have gotton mail, start over at the beginning. Can you explain
the special handling at the end of the recordset you're describing? Or
a reference to similiar code sample? That's where I seem to be having
the most trouble. I'm not sure if I should use DAO or ADO for my
connection to that table and if I should use Do until EOF or other
options.

Bob
Tom van Stiphout wrote:
On 5 Dec 2006 03:36:09 -0800, "Bob" <te*******@bellsouth.netwrote:

When I did something like this, I kept the value of the
EmployeeID_LastSent, so that next time I could go to the one after
that. That was done using rs.Move, with special handling for
end-of-recordset which meant going back to the first record.
In your case the recordset would only hold EmployeeIDs of salespeople
that are present in the office today.

-Tom.
I have an Access application where I need to automatically forward
emails to a group of 12 salespeople as soon as they arrive. The first
email needs to go to the first salesperson on the list, the second
email to the second salesperson on the list until I get to the end of
the list, then start over. I also need to be able to exclude
salespeople on their day off. The email portion of the application
will be using a rule in Outlook 2003 that runs a VBA project.

I was thinking of having a table with the salespersons name, email
address and some kind of flag value that I could have my VBA code look
for.. but thats where my lack of experience and knowledge becomes
apparent. I'm especially not sure of how to reset the process and
start over.

Does anyone have any suggestions or examples that may help?

Thank you in advance for any help you might havr!

Bob
Dec 5 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Jef Driesen | last post by:
I need to implement a function to implement the rounding of floating point values. At the moment i have two different implementations, depending on the type of the return value (integer or double)....
8
by: bonj | last post by:
hello I hope somebody can help me get my head around this area of 'stream' programming... I know that streams are very fashionable nowadays so hopefully there'll be lots of replies. ;-) ...
1
by: Ioannis Vranos | last post by:
I was checking .NET multithreading lately, and my book mentions that the thread scheduler provides quantoms of a time to each thread in "round robin" fashion. Is there any on line reference...
1
by: Robin Dindayal | last post by:
Does anyone know how I can print a fully rendered .aspx to the server's printer? I know that, if I wanted to print to the client's printer it would be easy (ie. use javascript's window.print()). ...
2
by: =?Utf-8?B?aGVyYmVydA==?= | last post by:
how do I code generic functions to return the next item in an enumeration a) sorted by name, b) sorted by value c) sorted by declaration in a round-robin style ? for example the enum is Enum...
6
by: Zeng | last post by:
Math.Round has good behavior as following: Math.Round(3.45, 1); //Returns 3.4. The last '5' is thrown away because 4 is even Math.Round(3.75, 1); //Returns 3.8. The last '5' is used because '7'...
34
by: arnuld | last post by:
what is the difference between these 2: char name = "hackers"; char* name = "hackers";
13
by: frk.won | last post by:
I am interested in learning how to use the VS 2005 code snippets. However, I wish to know what are the best ways to source control the code snippets? Are there any source safe/subversion...
1
by: HarishAdea | last post by:
Hi, I am trying to run the JAVA pgm, but it is giving error as "selection does not contain a main type". The filename is "ScoreLeadSummary.java" when i try to run it or debug,it gives the pop...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.