Iam trying to get the Email Address of 2 Staffs is "tblStaff" with 2 Conditions.
one condition is the sellerid and second condition is duty=2. following is the code iam using.
If DCount("[Duty]", "tblstaff", "[SellerID] = [cmbSeller] AND [Duty] = 2") >= 1 Then
For i = 1 To DCount("[Duty]", "tblstaff", "[SellerID] = [cmbSeller] AND [Duty] = 2")
sEmail = DLookup("", "tblstaff", "[SellerID] = [cmbSeller] AND [Duty] = 2")
Next i
sTo = sTo & ";" & DLookup("[Staff]", "tblstaff", "[SellerID] = [cmbSeller] AND [Duty] = 2") & " <" & sEmail & ">"
with the above code its struck on the the first row and not moving to the next row with the condition
Can someone help
one condition is the sellerid and second condition is duty=2. following is the code iam using.
If DCount("[Duty]", "tblstaff", "[SellerID] = [cmbSeller] AND [Duty] = 2") >= 1 Then
For i = 1 To DCount("[Duty]", "tblstaff", "[SellerID] = [cmbSeller] AND [Duty] = 2")
sEmail = DLookup("", "tblstaff", "[SellerID] = [cmbSeller] AND [Duty] = 2")
Next i
sTo = sTo & ";" & DLookup("[Staff]", "tblstaff", "[SellerID] = [cmbSeller] AND [Duty] = 2") & " <" & sEmail & ">"
with the above code its struck on the the first row and not moving to the next row with the condition
Can someone help