Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.
private sub cmb_task_beforeupdate(cancel as integer) dim rst recordset dim sql as string dim ind as integer sql = select taskxxx.[employeeid] from task where (((taskxxx.[employeeid])=" &parent![employeeid] & ") and (( taskxxx.[taskid]) ='" & me.cmb_task & "'));" set rst = currentdb.openrecordset(sql,dbopensnapshot) ind = rst.recordCount if ind > 0 then msgbox "duplicate" cancel = 1 end if
sql = select task.employeeid,task.id from task where task.employeeid = " & parent![parent_id] & ") and (( task.id)='" & me.cmb_task & "'));"
Join the community of 500,000 technology professionals and ask your questions.