Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
LOCATE command
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
LOCATE command
Divers
Thread ID:
00292564
Message ID:
00292564
Vues:
44
I've got a form that I am using to LOCATE records in a table. My problem is that the only way I can get my program to find a record is if I set the Value Property to a known record programmatically. When
I modify my form to remove the pre-set Value and enter a known record manually in run-time my messagebox keeps popping up with 'Record not found'. Here is my code:

If Thisform.opgSearchType.optPartNumb.Value = 1 Then
LOCATE for fullpric.catno = Thisform.txtFind.Value
If FOUND() Then
GOTO RECNO()
Thisform.Refresh
Else
GOTO TOP
MESSAGEBOX('Record not found')
Endif
Endif

The value being entered in the txtFind box is something like '25.320.3253.1', however, I also need it to jump to the first record containing a partial value like '25.320'. I'm assuming the = operation in the LOCATE line means 'find an exact match, not a partial match'. To get around that I tried

LOCATE for Thisform.txtFind.Value $ fullpric.catno

but that produces a FoxPro mismatch error.

Any ideas on how to make this work?

TIA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform