Information générale
Catégorie:
Codage, syntaxe et commandes
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement