SetWarning False not working

Joined
May 1, 2008
Messages
3
Reaction score
0
Good Monring

I was hoping someone could possible assist,

My Docmd. Setwarning False, still tells me i have deleted a record after i have set it to False.

I have turned them on and off after and before every command, but it still happens..

I was hoping someone could possible adivse where i am going wrong.

Thank you very much in advance

Code:
Private Sub OffLettReceived_AfterUpdate()
On Error GoTo Err_Handler
Dim iAnswer As Integer
 
DoCmd.SetWarnings False
 
If Me.OffLettReceived = -1 Then
 
		iAnswer = MsgBox("Would like to move the record for " _
		& Me.FirstName & " " & Me.Surname & " " _
		& "to the Employee Table?" _
		, vbCrLf & vbYesNoCancel)
 
End If
 
If iAnswer = vbYes Then
 
		DoCmd.RunSQL ("INSERT INTO tblEmpInfo SELECT * FROM TblOffer " & _
		"Where ID = Forms!frmOffer!ID;")
 
		DoCmd.RunSQL ("DELETE * FROM TblOffer " & _
		"Where ID = Forms!frmOffer!ID;")
 
		Me!CurrOffer.Requery
		 Forms!Frmoffer.Requery
 
DoCmd.SetWarnings True
 
	Else
 
	 DoCmd.Requery
 
		End If
 
 
Exit_OffLettReceived_AfterUpdate:
	Exit Sub
 
Err_Handler:
MsgBox Err.Description
Resume Exit_OffLettReceived_AfterUpdate
 
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top