Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prevent the user to enter duplicate piece number

Status
Not open for further replies.

h2mhd

Programmer
Feb 20, 2008
40
CA
Hi

i have a form workdone with a datasheet subform on it. The subform contains all the work done on a job, pieces and labor time.

what i want to do is to prevent the user to enter 2 times the same pieces or labor for the same idworkdone, and set the focus on the record that is the same that the user is trying to insert on my datasheet

is that possible to do, cause i c

here is the structure of my 2 tables

WORKDONE
idworkdone
dateworkdone
note

WORKDONEDETAIL
idworkdonedetail
idworkdone
idpiece
qty


thanks a lot
 
The best way would be to put an unique, combined index on the WORKDONEDETAIL table. You can the use the form error event to trap index violations.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top