SWEET! Thanks very much. I have been pulling out my hair trying to figure it out and everyone knows i cannot afford to do that!
Thanks! -----Original Message----- From: Michael Dinowitz [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 12:21 PM To: CF-Talk Subject: Re: new member w/ what should be easy to do but can't figure out. 1. Set a CFTRANSACTION block. 2. Inside the block, do a CFQUERY to put the survey information into the DB. 3. Inside the block, do a CFQUERY to get the ID of the last survey put in. Using the ID, do the following: <!--- The ID returned from the DB for the survey just entered ---> <CFSET nSurveyID=71> <!--- The amount of sales reps. This can be gotten from a list, DB or somewhere else ---> <CFSET lSalesRep=7> <!--- The rep you want to send to will be gotten by doing a MOD on the survey ID. ---> <CFSET nSendToRep=id mod list> <!--- If the result is 0, it means the sales rep is the last one, i.e. 7 in this case ---> <CFIF nSendToRep EQ 0><CFSET nSendToRep=lSalesRep></CFIF> <!--- Use the results ---> <CFOUTPUT>#nSendToRep#</CFOUTPUT> I wrote this to be as explanative as possible. Other ways may be better or tighter, but this will tell you exactly what's going on. At 11:28 AM 5/23/02, you wrote: >Hi all, > >I am a new member to this list and was wondering if I could ask for some >help. > >Here is what i need to do: >I have a survey that is on the web (duh) and when someone fills it out, i >want to insert into an access 2k db (no prob here) and then evenly >distribute (ie email) to sales reps. > >so, for the first survey filled out, it goes to rep 1, second survey goes to >rep 2, so on and so forth and when the amount of surveys exceed the reps, >then i go back to the first rep. > >i will send code if someone knows how to do this. > >Thanks a million! >Big T > > ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

