Hi
I am struggled with the code like back and forth. Maybe I am tired or Friday of 13th? Anyway, I am trying to set up the field like below:
AME00USD101000!AME00000101000
AME10USD101000!AME00000101000
AME10USD101000!AME00000101000
AME10USD101000!AME10USD101000 - I don't want that. How to get rid of.
I wrote the code:
'WORLD - BULOCPPPSSS
Set rsStruc = dbStruc.OpenRecordset("REGBULOCPPPSSS", 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"
strPPPSSS = rsStruc.Fields("PRODUCT"
strPPPSSSDesc = rsStruc.Fields("DESCRSHORT"
'NAME - WORLD
strEnt = strBU & strLOC & "000" & strPPPSSS
strEnt2 = strBU & strLOC & "USD" & strPPPSSS
strEntDesc = strLOCDesc & " " & strPPPSSSDesc
If strEnt <> strEnt1 And strP <> 0 Then Print #intName, strEnt & "!" & strEntDesc & "!" & strBU & strP & strNameEnd & strCCC & strNameEnd1
If strEnt <> strEnt1 And strP = 0 Then Print #intName, strEnt & "!" & strEntDesc & "!" & strBU & strNameEnd & strCCC & strNameEnd1
If strEnt3 <> strEnt2 And strP <> 0 Then Print #intName, strEnt2 & "!" & strEntDesc & "!" & strBU & strP & " ! !USD !0! ! ! ! !CHART! ! ! !CHART"
If strEnt3 <> strEnt2 And strP = 0 Then Print #intName, strEnt2 & "!" & strEntDesc & "!" & strBU & " ! !USD !0! ! ! ! !CHART! ! ! !CHART"
'OWNER - WORLD
If strEnt <> strEnt1 And strP = 0 Then Print #intOwn, strBU & strLOC & "000" & strPPP & "XXX" & "!" & strEnt & strOwnEnd
If strEnt <> strEnt1 And strP <> 0 Then Print #intOwn, strBU & strLOC & "000" & strPPP & "XXX" & "!" & strEnt & strOwnEnd
If strEnt3 <> strEnt2 And strP = 0 Then Print #intOwn, strBU & strLOC & "USD" & strPPP & "XXX" & "!" & strEnt2 & strOwnEnd
If strEnt3 <> strEnt2 And strP <> 0 Then Print #intOwn, strBU & strLOC & "USD" & strPPP & "XXX" & "!" & strEnt2 & strOwnEnd
If strEnt <> strEnt1 And strP = 0 Then Print #intOwn, strBU & strLOC & "USD" & strPPPSSS & "!" & strEnt & strOwnEnd
If strEnt <> strEnt1 And strP <> 0 Then Print #intOwn, strBU & strLOC & "USD" & strPPPSSS & "!" & strEnt & strOwnEnd
strEnt1 = strEnt
strEnt3 = strEnt2
strEnt2 = strEnt
rsStruc.MoveNext
Loop
rsStruc.Close
Am I missing? Please find something.
Thanks for all your help. :-0
chsu
[sig][/sig]
I am struggled with the code like back and forth. Maybe I am tired or Friday of 13th? Anyway, I am trying to set up the field like below:
AME00USD101000!AME00000101000
AME10USD101000!AME00000101000
AME10USD101000!AME00000101000
AME10USD101000!AME10USD101000 - I don't want that. How to get rid of.
I wrote the code:
'WORLD - BULOCPPPSSS
Set rsStruc = dbStruc.OpenRecordset("REGBULOCPPPSSS", 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"
strPPPSSS = rsStruc.Fields("PRODUCT"
strPPPSSSDesc = rsStruc.Fields("DESCRSHORT"
'NAME - WORLD
strEnt = strBU & strLOC & "000" & strPPPSSS
strEnt2 = strBU & strLOC & "USD" & strPPPSSS
strEntDesc = strLOCDesc & " " & strPPPSSSDesc
If strEnt <> strEnt1 And strP <> 0 Then Print #intName, strEnt & "!" & strEntDesc & "!" & strBU & strP & strNameEnd & strCCC & strNameEnd1
If strEnt <> strEnt1 And strP = 0 Then Print #intName, strEnt & "!" & strEntDesc & "!" & strBU & strNameEnd & strCCC & strNameEnd1
If strEnt3 <> strEnt2 And strP <> 0 Then Print #intName, strEnt2 & "!" & strEntDesc & "!" & strBU & strP & " ! !USD !0! ! ! ! !CHART! ! ! !CHART"
If strEnt3 <> strEnt2 And strP = 0 Then Print #intName, strEnt2 & "!" & strEntDesc & "!" & strBU & " ! !USD !0! ! ! ! !CHART! ! ! !CHART"
'OWNER - WORLD
If strEnt <> strEnt1 And strP = 0 Then Print #intOwn, strBU & strLOC & "000" & strPPP & "XXX" & "!" & strEnt & strOwnEnd
If strEnt <> strEnt1 And strP <> 0 Then Print #intOwn, strBU & strLOC & "000" & strPPP & "XXX" & "!" & strEnt & strOwnEnd
If strEnt3 <> strEnt2 And strP = 0 Then Print #intOwn, strBU & strLOC & "USD" & strPPP & "XXX" & "!" & strEnt2 & strOwnEnd
If strEnt3 <> strEnt2 And strP <> 0 Then Print #intOwn, strBU & strLOC & "USD" & strPPP & "XXX" & "!" & strEnt2 & strOwnEnd
If strEnt <> strEnt1 And strP = 0 Then Print #intOwn, strBU & strLOC & "USD" & strPPPSSS & "!" & strEnt & strOwnEnd
If strEnt <> strEnt1 And strP <> 0 Then Print #intOwn, strBU & strLOC & "USD" & strPPPSSS & "!" & strEnt & strOwnEnd
strEnt1 = strEnt
strEnt3 = strEnt2
strEnt2 = strEnt
rsStruc.MoveNext
Loop
rsStruc.Close
Am I missing? Please find something.
Thanks for all your help. :-0
chsu
[sig][/sig]