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:
00803842
Views:
8
>I have a grid witch accepts new entries. I need a way to check for double entries. Each entry needs to be unique or I get an error that the new record is cousing conflicts.

Jan Vantveer suggests a unique index on the grids table/cursor data source. You can [also] use a standard index and check (using INDEXSEEK) without moving the record pointer or using ON ERROR:
IF INDEXSEEK(lcCheckKey,.F.,'MyTableOrCursor','MyCheckKeyTag')
   * message the user and clear tyhe textbox
ELSE && Not there
   * accept entry as valid
ENDIF
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform