Hi
Any chance with a bit of help on this please?
I've created a report that has a linked report attached to a button that allows the user to enter a new record. All this works fine but I would like to create a popup message that informs the user that they have attempted to add a record that already exists ie a Duplicate entry for key 'PRIMARY' - error 1062 I think.
At the moment I display an message via dbr.text. I would like a popup message dialogue box that informs the user that the record already exists and a OK to continue that refreshes the main report. I think I would need to use some javascript here but I haven't a clue as to how to go about it.
I've tried this and it works but not very elegant.
if not exists (select tblContractXidJobNo from hilmark.tblsitesplotsjake where tblContractXidJobNo = concat((select Plot_Prefix from hilmark.tblsitesjake where Site_ID=inSiteID),'_',inPlotNum))
then
insert into hilmark.tblsitesplotsjake ( tblContractXidJobNo, Site_ID, Plot_Phase) values ( concat((select Plot_Prefix from hilmark.tblsitesjake where Site_ID=inSiteID),'_',inPlotNum),inSiteID, inPhaseID);
select 'dbr.refresh';
else
select 'dbr.text', "This Plot already exists!", 'comment';
end if;
Many thanks
Jake