A little Access VBA help? Validating against duplication of a non key field? -


i adding part name database using form, code put behind add part button validate against duplicate part names? (part number primary key) think need recordset search , compare table i'm bit lost, great.

private sub btn_add_click() rs_parts.addnew  rs_parts !partrno = lbl_partno.caption !name = txt_name rs_parts.update end 

i've discussed approach before, , given example form adding new record.

i use unbound form collect information needed create new record, , have check duplicates, , present list of them user user can decide do.

in case, sounds unique index in order, won't need worry close matches. still use unbound form capture new value , run check before attempting add it. in case, i'd notify user it's dupe.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -