I am trying to insert a post which already exist. If it exists i don't want to write the post in the table.
Doing this is by select case in errorhandler
My problem is that i don't get a chance to taking care of the sql-error code since i am doing DoCmd.RunSQL (strSQL).
strSQL = "INSERT INTO Rapp_Temp"
strSQL = strSQL & " ([ID-PROJEKTDELTAGARE], [DA-AR], [ID-AKTIVITET], [ID-PROJEKT], [BE-PROJEKT], [BE-AKTIVITET])"
strSQL = strSQL & " VALUES (" & TidrappTab(ixa, 2) & ", " & TidrappTab(ixa, 6) & ", " & TidrappTab(ixa, 1) & ","
strSQL = strSQL & " " & id_proj & ", '" & be_proj & "', '" & be_akt & "');"
When i use
Set qdf = dbThis.CreateQueryDef("", strSQL)
Set rst = qdf.OpenRecordset(dbOpenSnapshot)
i came to errorhandler where i can use
Select Case Err.Number
plantemp_koll = 0
Anyone knowing how to handle "post exists" and then continuing with next post?