Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Category:
Forms & Form designer
Pascal,
Have you put a Set Step On into the method to start the debugger and see what the values are during the first and subsequent passes?
Renoir
>Ok been trying to figure out what is wrong here and I am at a loss, maybe
>someone can see what it is hopefully.
>
>This is the valid method for a textbox on a form that checks to make sure the
>entry number (no_entre) doesnt already exists. Somehow, the method lets you get through with a duplicate entry number on first pass, if you go back to the field
>then it wont let you go through.
>
>I have verified that in both cases the method does fire so I am at a loss to understand why it lets you go through on first pass while working for second pass.
>
>1) Textbox.ControlSource=rec_fou.no_entre
>2) rec_fou2 is rec_fou opened again in dataenvironement with another alias name.
>3) MessageOK just display some text
>
>Here is the method code:
>------------------------------------------------------------------
>
>local cAnswer,nRecno,cNo_entre
>
>cNo_entre=this.value
>
>if empty(cNo_entre)
> cAnswer=oApp.oUtility.MessageOk(..)
> return 0
>endif
>
>select rec_fou2
>seek padr(cNo_entre,10)
>
>if found()
> cAnswer=oApp.oUtility.MessageOk(...)
> select rec_fou
> return 0
>endif
>
>select rec_fou
>return .t.
>
>
>------------------------------------------------------------------
>
>Any suggestions ?
>
>Thanks
>
>Pascal
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only