Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking for unique entries
Message
 
To
24/06/2003 10:46:08
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00803298
Message ID:
00803356
Views:
14
Hi Steven,

Try something like that:
m.nRecNo = Iif(Eof() .or. Bof(),0,RecNo())
Locate for YourField = m.NewValue .and. RecNo()#m.nRecNo
m.lDuplicated = Found()
If m.nRecNo#0
    Go m.nRecNo
EndIf
Return m.Duplicated
I didn't test it here, but I think it works...

I don't know what is the sittuation that you are using it... I use something like that in child grids to avoid users repeat your entries...

If you having problems with Primary (or Candidate) indexes, I think you need control it using an error routine!

[]s!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Rodolfo Duarte
Previous
Reply
Map
View

Click here to load this message in the networking platform