Mike,
I put a breakpoint right before the query and check the value and type of "&INV", &INV, and INV.
STORE "2 " TO INV
INV was = "2 "
&INV was 2 (numeric)
and "&INV" showed in the Watch window as Name: "2 " Value "2 "
Are you sure you didn't mean
WHERE Factgrostete.invnumb = &INV;
in your second example?
There shouldn't be any problem with spaces before the semmicolons unless you are building a command string, in which case Vlad's comment is true. Personally, I use a space because that's the way I like it! ;-)
Also, if you hit reply you'll notice that I put < pre > and < /pre > (without spaces) around the code. Makes it read better!
>Can someone explain to me why this works:
>
>
STOR ALLT(THISFORM.INVNUMB1.VALUE) TO INV
>SELECT *;
> FROM transactions!factgrostete INNER JOIN transactions!factgros ;
> ON Factgrostete.invnumb = Factgros.invnumb;
> WHERE Factgrostete.invnumb = "&INV";
> INTO CURSOR QUERY1
>
>And this does not:
>
>
STOR ALLT(THISFORM.INVNUMB1.VALUE) TO INV
>SELECT *;
> FROM transactions!factgrostete INNER JOIN transactions!factgros ;
> ON Factgrostete.invnumb = Factgros.invnumb;
> WHERE Factgrostete.invnumb = INV;
> INTO CURSOR QUERY1
>
>Whit this one I get an Operand mismatch. The INV value is character and the invnumb field is character.