Hi everyone!
I am testing on the module. And I am writing the code:
'WORLD - BULOCP
Set rsStruc = dbStruc.OpenRecordset("REGBULOCP", 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"
'NAME - WORLD
strEnt = strBU & strLOC & "000" & strP
strEnt2 = strBU & strLOC & "USD" & strP
strEntDesc = strLOCDesc & " " & strPDesc
If strEnt1 <> strEnt And strP <> 0 Then Print #intName, strEnt & "!" & strEntDesc & "!" & strBU & strP & strNameEnd & strCCC & strNameEnd1
If strEnt3 <> strEnt2 And strP <> 0 Then Print #intName, strEnt2 & "!" & strEntDesc & "!" & strBU & strP & " ! !USD !0! ! ! ! !CHART! ! ! !CHART"
'OWNER - WORLD
If strEnt1 <> strEnt And strP <> 0 Then Print #intOwn, strBU & strLOC & "!" & strEnt & strOwnEnd
If strEnt3 <> strEnt2 And strP <> 0 Then Print #intOwn, strBU & strLOC & "!" & strEnt2 & strOwnEnd
strEnt1 = strEnt
strEnt3 = strEnt2
rsStruc.MoveNext
Loop
rsStruc.Close
When it run:
AME000001
AME000002
AME000004
AME000005
AME000007
NOR100001
NOR100002
NOR100004
....
....
What I need for example below:
AME000000
AME000001
AME000002
AME000004
AME000005
AME000007
AME000009
GER000000
GER000001
....
....
It won't print "0" and "9". I did check the table which it has! It s no problem but the module is not working. Or Am I missing?
Please help me out.
Thanks,
chsu [sig][/sig]
I am testing on the module. And I am writing the code:
'WORLD - BULOCP
Set rsStruc = dbStruc.OpenRecordset("REGBULOCP", 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"
'NAME - WORLD
strEnt = strBU & strLOC & "000" & strP
strEnt2 = strBU & strLOC & "USD" & strP
strEntDesc = strLOCDesc & " " & strPDesc
If strEnt1 <> strEnt And strP <> 0 Then Print #intName, strEnt & "!" & strEntDesc & "!" & strBU & strP & strNameEnd & strCCC & strNameEnd1
If strEnt3 <> strEnt2 And strP <> 0 Then Print #intName, strEnt2 & "!" & strEntDesc & "!" & strBU & strP & " ! !USD !0! ! ! ! !CHART! ! ! !CHART"
'OWNER - WORLD
If strEnt1 <> strEnt And strP <> 0 Then Print #intOwn, strBU & strLOC & "!" & strEnt & strOwnEnd
If strEnt3 <> strEnt2 And strP <> 0 Then Print #intOwn, strBU & strLOC & "!" & strEnt2 & strOwnEnd
strEnt1 = strEnt
strEnt3 = strEnt2
rsStruc.MoveNext
Loop
rsStruc.Close
When it run:
AME000001
AME000002
AME000004
AME000005
AME000007
NOR100001
NOR100002
NOR100004
....
....
What I need for example below:
AME000000
AME000001
AME000002
AME000004
AME000005
AME000007
AME000009
GER000000
GER000001
....
....
It won't print "0" and "9". I did check the table which it has! It s no problem but the module is not working. Or Am I missing?
Please help me out.
Thanks,
chsu [sig][/sig]