>I have a form that displays company address info in text boxes then processes that company does in a grid. I have add/edit buttons for each part of the form (address and process info). Everything seems to be working correctly until I need to verify the process that is being added does not already exist for that company. I am just not sure what is wrong with my code. No matter what the process is added and no error message was given. I am using VFP 7. Kudus to whoever helps me with this dilemma.
Hello Julie;
To be a little more specific, just knowing your all project:
But, there is something that can be changed (I believe):
l_prcode = this.value
l_cocode = this.parent.otherfield.value
IF EMPTY( l_prcode )
MESSAGEBOX( 'Product Code is required.', 48, 'Please fix your entry' )
RETURN .F.
ELSE
sele myalias
SEEK l_cocode + l_prcode
IF .not. FOUND()
MESSAGEBOX( 'Product Code is required.', 48, 'Product does not exist' )
RETURN .F.
ELSE
MESSAGEBOX( 'Listing has been added.' )
RETURN .T.
ENDIF
ENDIF
HTH
Claudio
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20