VBA string bug? - 03-26-2009 , 03:20 AM
I've got an Access application which is behaving rather strange. It
has trouble handling strings correctly in VBA at random places.
When stepping through the code it leaves out the bold part " AS ID, ".
But when I add an extra space somewhere in that line, than it behaves
Similar problems in other parts of the application too. I've already
tried decompiling etc, to clean things up. I even made a new mdb and
imported all objects and code, but no effect.
Has someone every seen anything like this too? I cannot imagine being
the first to have this problem.
Another example would be:
Here it leaved out the entire first line. When stepping through the
code the string would still be empty after executing only the first
line. But again, by adding a space somewhere inside the string, it
would work again.
This is Access 2003 SP3, VBA6.3.
Re: VBA string bug? - 03-26-2009 , 03:34 AM
On Mar 26, 3:20*am, stefan.k... (AT) gmail (DOT) com wrote:
Re: VBA string bug? - 03-26-2009 , 06:55 AM
stefan.krul (AT) gmail (DOT) com wrote:
strSQL = "SELECT " & strOmschrijving & " AS Omschrijving,
strSQL = strSQL & "CStr(V.Jaar) + ' ' + Format(V." & strPeriode & ",'00') AS
strSQL = strSQL & "CStr(intNiveau) AS Niveau,
strSQL = strSQL & strID & " AS ID, "
strSQL = strSQL & "CStr(GeefMaxSortering + 1) & " + (3000-V.Jaar)*10000 -
V." & strPeriode & " AS Sortering