Hi,
1) I have two tables: ARTI and MLOC
ARTI: Articles (columns: COD_ART, DESCRIPTION,.....)
MLOC: Location of the articles (columns: COD_ART, LOCATION)
2) When I go to a product, I press F8 and I want to show on screen a list of
the locations of that specified article.
So in table MLOC, there are multiple records with the same COD_ART (Code of
article), but different locations.
When I am in the screen of the article I scan the MLOC table and .... [here
is my problem] only want to display the records which have the same COD_ART.
I only get the "first" record of the MLOC table which has that condition.
My code is :
===
Function TEST()
LOCAL nSavRecord := RECNO()
IF ( MLOC->(DBSEEK(arti->COD_ART)) )
@0,0 SAY "YES WE HAVE SOMETHING"
x=1
Do WHILE .NOT. EOF()
IF ( MLOC->(DBSEEK(arti->COD_ART)) )
@1,x SAY mloc->LOCATION
endif
x=x+10
SKIP
ENDDO
ELSE
@0,0 SAY "NOTHING"
END
GOTO nSavRecord
Return .t.
===
Any help is welcome!!!!
P.S.: I just started since yesterday in CLipper
Thx
David
1) I have two tables: ARTI and MLOC
ARTI: Articles (columns: COD_ART, DESCRIPTION,.....)
MLOC: Location of the articles (columns: COD_ART, LOCATION)
2) When I go to a product, I press F8 and I want to show on screen a list of
the locations of that specified article.
So in table MLOC, there are multiple records with the same COD_ART (Code of
article), but different locations.
When I am in the screen of the article I scan the MLOC table and .... [here
is my problem] only want to display the records which have the same COD_ART.
I only get the "first" record of the MLOC table which has that condition.
My code is :
===
Function TEST()
LOCAL nSavRecord := RECNO()
IF ( MLOC->(DBSEEK(arti->COD_ART)) )
@0,0 SAY "YES WE HAVE SOMETHING"
x=1
Do WHILE .NOT. EOF()
IF ( MLOC->(DBSEEK(arti->COD_ART)) )
@1,x SAY mloc->LOCATION
endif
x=x+10
SKIP
ENDDO
ELSE
@0,0 SAY "NOTHING"
END
GOTO nSavRecord
Return .t.
===
Any help is welcome!!!!
P.S.: I just started since yesterday in CLipper
Thx
David