Ashish Batham
Member
'2. Get replicated category from replicated asset, change rep type id to be cdx* so it will be tossed later in the process
For x = 1 To RepCount
sql = "SELECT EXTRACT_MASTER.* FROM EXTRACT_MASTER WHERE ((Extract_Master![Lot Rep Type Id]) = 'rsun" & RepID(x) & "')"
Set rs = db.OpenRecordset(sql)
RepCat(x) = rs("Lot TAS Category")
RepCoup(x) = rs("Sum Cpn Rt")
rs.Edit
rs("Lot Rep Type ID") = "CDX" & RepID(x)
rs.Update
Next x
'end 2.
'3. Update base asset with replicated category, coupon, TAS File Type, and change rep type id to be cds* so it will NOT be tossed later,
For x = 1 To RepCount
sql = "SELECT EXTRACT_MASTER.* FROM EXTRACT_MASTER WHERE ((Extract_Master![Lot Rep Type Id]) = 'rstn" & RepID(x) & "')"
Set rs = db.OpenRecordset(sql)
Do Until rs.EOF
rs.Edit
rs("Lot TAS Category") = "P" & RepCat(x)
'rs("Coupon") = RepCoup(x)
rs("Lot Rep Type ID") = "CDS" & RepID(x)
Select Case RepCat(x)
Case "A3"
rs("TAS File Type") = "EPAZ1"
Case "A2"
rs("TAS File Type") = "EPAZ2"
Case "A1"
rs("TAS File Type") = "EPAZ3"
Case "B3"
rs("TAS File Type") = "EPAZ4"
Case "B2"
rs("TAS File Type") = "EPAZ5"
Case "B1"
rs("TAS File Type") = "EPAZ6"
End Select
rs.Update
rs.MoveNext
Loop
Next x
'end 3.
For x = 1 To RepCount
sql = "SELECT EXTRACT_MASTER.* FROM EXTRACT_MASTER WHERE ((Extract_Master![Lot Rep Type Id]) = 'rsun" & RepID(x) & "')"
Set rs = db.OpenRecordset(sql)
RepCat(x) = rs("Lot TAS Category")
RepCoup(x) = rs("Sum Cpn Rt")
rs.Edit
rs("Lot Rep Type ID") = "CDX" & RepID(x)
rs.Update
Next x
'end 2.
'3. Update base asset with replicated category, coupon, TAS File Type, and change rep type id to be cds* so it will NOT be tossed later,
For x = 1 To RepCount
sql = "SELECT EXTRACT_MASTER.* FROM EXTRACT_MASTER WHERE ((Extract_Master![Lot Rep Type Id]) = 'rstn" & RepID(x) & "')"
Set rs = db.OpenRecordset(sql)
Do Until rs.EOF
rs.Edit
rs("Lot TAS Category") = "P" & RepCat(x)
'rs("Coupon") = RepCoup(x)
rs("Lot Rep Type ID") = "CDS" & RepID(x)
Select Case RepCat(x)
Case "A3"
rs("TAS File Type") = "EPAZ1"
Case "A2"
rs("TAS File Type") = "EPAZ2"
Case "A1"
rs("TAS File Type") = "EPAZ3"
Case "B3"
rs("TAS File Type") = "EPAZ4"
Case "B2"
rs("TAS File Type") = "EPAZ5"
Case "B1"
rs("TAS File Type") = "EPAZ6"
End Select
rs.Update
rs.MoveNext
Loop
Next x
'end 3.