beforeupdate to validate record

  • Thread starter Thread starter atomic
  • Start date Start date
A

atomic

Guest
hi all,

i am having a little trouble with checking if a record has been entered into the database before it is added. (duplicate records - user is prompted wether they wish to add a new order on the same date to the same supplier!!)

the problem is that the event is triggered after every button control click and i only need it to work if the user clicks the Save button or click the NewRecord button that comes with the form.

is there another way i can check to see if a record has been entered??

thanx in advance,
andy
 
hi dfresh

i am not checking for duplicate values in the primary key. i am looking for a condition to be met.

if orderdate and companyname exists then
prompt user to save
if user wants to save then
add record
else
do not add record
end if
end if

there is more than one field involved. if i add this into the FORM_BeforeUpdate procedure, everytime i click a Command Button (i have a print preview button and get customer detailsbutton), it goes thru the above procedure. i only need it when i attempt to save a record or move to a new record.

does this make sense?

cheers
a
smile.gif
 

Users who are viewing this thread

Back
Top Bottom