Hi everyone!
I am trying to get rid of the line. For example: (what I need that)
AME00000101XXX - keep
AME00000102XXX - keep
AME00000199XXX - keep
AME00000201XXX - keep
AME00000202XXX - keep
AME00000203XXX - keep
AME10000101XXX - keep
AME10000102XXX - keep
...
...
...
AME30000101XXX - keep
AME30000102XXX - keep
AME30000199XXX - keep
AME30000202XXX - remove
AME30000204XXX - remove
AME30000205XXX - remove
...
...
UKE90000799XXX - keep
UKE90000999XXX - keep
I hope you can help me out for re-writing the code. Here I have the code:
'WORLD - BULOCPPP
Set rsStruc = dbStruc.OpenRecordset("REGBULOCPPP", dbOpenSnapshot)
rsStruc.MoveFirst
Do Until rsStruc.EOF
strBU = Right(rsStruc.Fields("BUSINESS_UNIT", 3)
strBUDesc = rsStruc.Fields("Bu ShortDesc"
strLOC = rsStruc.Fields("LOCAL_CTRY"
strLOCDesc = rsStruc.Fields("LOCAL_SHORTDESCR"
strCCC = rsStruc.Fields("CURCODE"
strP = rsStruc.Fields("PRACTICE"
strPDesc = rsStruc.Fields("DESCRIPTION"
strPPP = rsStruc.Fields("PPP"
strPPPDesc = rsStruc.Fields("PPPDESC"
'NAME - WORLD
strEnt = strBU & strLOC & "000" & strPPP & "XXX"
strEnt2 = strBU & strLOC & "USD" & strPPP & "XXX"
strEntDesc = strLOCDesc & " " & strPPPDesc
If strEnt1 <> strEnt And strPPP <> 0 Then Print #intName, strEnt & "!" & strEntDesc & "!" & strBU & strP & strNameEnd & strCCC & strNameEnd1
If strEnt3 <> strEnt2 And strPPP <> 0 Then Print #intName, strEnt2 & "!" & strEntDesc & "!" & strBU & strP & " ! !USD !0! ! ! ! !CHART! ! ! !CHART"
'OWNER - WORLD
If strEnt1 <> strEnt And strP > -1 Then Print #intOwn, strBU & strLOC & "000" & strP & "!" & strEnt & strOwnEnd
If strEnt3 <> strEnt2 And strP > -1 Then Print #intOwn, strBU & strLOC & "USD" & strP & "!" & strEnt2 & strOwnEnd
strEnt1 = strEnt
strEnt3 = strEnt2
rsStruc.MoveNext
Loop
rsStruc.Close
Let me know. Thank you for your help.
Regards,
Candice
I am trying to get rid of the line. For example: (what I need that)
AME00000101XXX - keep
AME00000102XXX - keep
AME00000199XXX - keep
AME00000201XXX - keep
AME00000202XXX - keep
AME00000203XXX - keep
AME10000101XXX - keep
AME10000102XXX - keep
...
...
...
AME30000101XXX - keep
AME30000102XXX - keep
AME30000199XXX - keep
AME30000202XXX - remove
AME30000204XXX - remove
AME30000205XXX - remove
...
...
UKE90000799XXX - keep
UKE90000999XXX - keep
I hope you can help me out for re-writing the code. Here I have the code:
'WORLD - BULOCPPP
Set rsStruc = dbStruc.OpenRecordset("REGBULOCPPP", dbOpenSnapshot)
rsStruc.MoveFirst
Do Until rsStruc.EOF
strBU = Right(rsStruc.Fields("BUSINESS_UNIT", 3)
strBUDesc = rsStruc.Fields("Bu ShortDesc"
strLOC = rsStruc.Fields("LOCAL_CTRY"
strLOCDesc = rsStruc.Fields("LOCAL_SHORTDESCR"
strCCC = rsStruc.Fields("CURCODE"
strP = rsStruc.Fields("PRACTICE"
strPDesc = rsStruc.Fields("DESCRIPTION"
strPPP = rsStruc.Fields("PPP"
strPPPDesc = rsStruc.Fields("PPPDESC"
'NAME - WORLD
strEnt = strBU & strLOC & "000" & strPPP & "XXX"
strEnt2 = strBU & strLOC & "USD" & strPPP & "XXX"
strEntDesc = strLOCDesc & " " & strPPPDesc
If strEnt1 <> strEnt And strPPP <> 0 Then Print #intName, strEnt & "!" & strEntDesc & "!" & strBU & strP & strNameEnd & strCCC & strNameEnd1
If strEnt3 <> strEnt2 And strPPP <> 0 Then Print #intName, strEnt2 & "!" & strEntDesc & "!" & strBU & strP & " ! !USD !0! ! ! ! !CHART! ! ! !CHART"
'OWNER - WORLD
If strEnt1 <> strEnt And strP > -1 Then Print #intOwn, strBU & strLOC & "000" & strP & "!" & strEnt & strOwnEnd
If strEnt3 <> strEnt2 And strP > -1 Then Print #intOwn, strBU & strLOC & "USD" & strP & "!" & strEnt2 & strOwnEnd
strEnt1 = strEnt
strEnt3 = strEnt2
rsStruc.MoveNext
Loop
rsStruc.Close
Let me know. Thank you for your help.
Regards,
Candice