Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unique Records
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Unique Records
Divers
Thread ID:
00805977
Message ID:
00805977
Vues:
60
I have a program which consists of a form with an edit box and list box and a command button. When I enter a number in the edit box it will search the content of the table and return the design number. It acts as a where used scenario. For example if I search on the number 000737 it will give me the results:

T59*SS2003*JKT400*TECHNICAL
T59*SS2003*JKT400*TECHNICAL
T57*SS2003*SK167*SAMPLE
T56*AW2004*BC159*SAMPLE

The reason why there are 2 records the same is because that number appears twice under that design number. How can I change my code below to show only occurence of each record:

T59*SS2003*JKT400*TECHNICAL
T57*SS2003*SK167*SAMPLE
T56*AW2004*BC159*SAMPLE

Here is my code:

SET EXCLUSIVE OFF
SET DELETED ON

SELECT article.articleno, specific.articleno, specific.mainkey ;
FROM ("U:\Data\article"), ("U:\Data\specific") ;
WHERE thisform.text1.Value=article.articleno AND article.articleno=specific.articleno ;
INTO CURSOR temp

WITH thisform.list1
.RowSourceType = 3
.RowSource = 'Select mainkey from temp into cursor result'
.ColumnCount = 1
ENDWITH

IF EMPTY(temp.articleno_a)
MESSAGEBOX("No records have been found",048,"Articles Where Used Alert Manager")
ELSE
ENDIF

Many Thanks
Neil Lewis
IT R&D Manager
Velmore Ltd
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform