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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Allow a duplicate

Status
Not open for further replies.

Silvinho

Programmer
Jul 9, 2001
58
GB
Is it possible to allow a new record entered in a database from a web browser be a duplicate entry in a No duplicates type field.

The database im using has a different reference code for each record that is set to no duplicates. The thing is some of the records entered dont have a code to start with so the field is left blank. This activates the duplicate error message as there is already a blank code in another record.

is it possible to have the database accept a blank field not as a duplicate.
 
No.
I suppose you are not happy with code 'space'? so your form validation should prohibit that.
or
You want a unique code to be entered or space. In that case you must program this behavior:
o The field can not stay 'no duplicates' (because you want to allow more than 1 record with code 'space')
o Define an index for this field (preferable: where code <> '')
o When the user enters no code the record can be INSERTed
o When the user enters a code you must check if it already exists br
Gerard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top