Need help with Loop Statement....

Results 1 to 2 of 2

Thread: Need help with Loop Statement....

  1. #1
    Join Date
    Dec 1969

    Default Need help with Loop Statement....

    If have a record set that is grouped by country code. In my SQL statement I grab the fields from two tables based on set criteria and the last statement is to order by country code. I want to loop through these records and build an unique email message for each country code. Before building my email message I am just writing the data to an html page to see what I am getting. I loop through and response.write all the records. My recordset contains the data I want grouped by country. The problem is I have no clue how to set the loop to stop, send the email, loop through again and repeat the process. I know how to build the email. I know how to write a loop but I just don’t know how to set it to break for each country. Can anyone help!!! All I need is the code for the break.

  2. #2
    Join Date
    Dec 1969

    Default RE: Need help with Loop Statement....

    I think what you need is a select case<BR><BR>For/Do<BR>Select Case Country<BR>Case USA<BR>&#039message for USA<BR>Case Canada<BR>&#039message for Canada<BR>Case Else<BR>&#039default message<BR>End Select<BR>&#039send mail statements<BR>Next/Loop

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts