E
EVPLS
Hi,
in Access 2003, I'm trying to "conditionally" concatenate strings. It's been
my understanding that the "+" symbol does the job. This is what I'm trying to
do:
If InStr(1, strInput, "A", vbTextCompare) > 0 Then _
varRegional = "Asia/Pacific"
If InStr(1, strInput, "E", vbTextCompare) > 0 Then _
varRegional = (varRegional + ", ") & "Europe"
strInput can be any 1 to 5 character combination of A, E, N, S and R (Asia,
Europe, NAFTA, South America and rest of world).
When processing the "Europe instruction", varRegional may be Null if "A"
were not in strInput. The "Europe" instruction always returns ", Europe",
including the trailing comma. I tried with and without the paratheses in the
"varRegional = ..." instruction.
Am I mistaken or missing out on something? References (in this order) are:
Visual Basic for Applications, Microsoft Access 11.0 Object Library,
Microsoft DAO 3.6 Object Library, Microsoft Visual Basic for Applications
Extensibility 5.3 and OLE Automation.
My company has just switched over from AC97 to AC2003. And they are known
for "crippling" applications. On my home computer, still with AC97 as
Microsoft designed it, this type of concatenation seems to work (playing with
sample data bases provided in John Viescas' book "Building Access 2003
Applications", he conjures up SQL strings that way). Needless to say, his
concatenation fails, too, on my office computer (SQL strings all have a
leading " AND " statement).
Any help is appreciated, thanks in advance.
in Access 2003, I'm trying to "conditionally" concatenate strings. It's been
my understanding that the "+" symbol does the job. This is what I'm trying to
do:
If InStr(1, strInput, "A", vbTextCompare) > 0 Then _
varRegional = "Asia/Pacific"
If InStr(1, strInput, "E", vbTextCompare) > 0 Then _
varRegional = (varRegional + ", ") & "Europe"
strInput can be any 1 to 5 character combination of A, E, N, S and R (Asia,
Europe, NAFTA, South America and rest of world).
When processing the "Europe instruction", varRegional may be Null if "A"
were not in strInput. The "Europe" instruction always returns ", Europe",
including the trailing comma. I tried with and without the paratheses in the
"varRegional = ..." instruction.
Am I mistaken or missing out on something? References (in this order) are:
Visual Basic for Applications, Microsoft Access 11.0 Object Library,
Microsoft DAO 3.6 Object Library, Microsoft Visual Basic for Applications
Extensibility 5.3 and OLE Automation.
My company has just switched over from AC97 to AC2003. And they are known
for "crippling" applications. On my home computer, still with AC97 as
Microsoft designed it, this type of concatenation seems to work (playing with
sample data bases provided in John Viescas' book "Building Access 2003
Applications", he conjures up SQL strings that way). Needless to say, his
concatenation fails, too, on my office computer (SQL strings all have a
leading " AND " statement).
Any help is appreciated, thanks in advance.