Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Access Forms Coding > Docmd.Setwarnin...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 8 Topic 41511 of 43412
Post > Topic >>

Docmd.Setwarning False Not Working

by =?Utf-8?B?U04=?= <SN@[EMAIL PROTECTED] > Aug 6, 2008 at 01:24 AM

Good Morning
I was hoping someone could possibly assist.

My my after update event, 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 told to change the code from docmd.runsql to CurrentDb.Execute and 
still it happens.

[code]

Private Sub OffLettReceived_AfterUpdate()
On Error GoTo Err_Handler

     Dim stDocName As String
    Dim stLinkCriteria As String
    Dim iAnswer As Integer

    If IsNull(Me!ID) Then stLinkCriteria = ""
    stLinkCriteria = "[ID]=" & Me![ID]
    
 
If Me.OffLettReceived = -1 Then
   
   DoCmd.SetWarnings (False)
     
        iAnswer = MsgBox("Would like to move the record for " _
        & Me.FirstName & " " & Me.Surname & " " _
        & "to the Employee Table?" _
        , vbCrLf & vbYesNoCancel)
        
 
    DoCmd.SetWarnings (True)

If iAnswer = vbYes Then

    DoCmd.SetWarnings (False)

Me.Status = "offer"

    CurrentDb.Execute "INSERT INTO tblEmpInfo SELECT * FROM TblOffer " & _
    " WHERE [ID] = " & Forms!frmOffer!ID, dbFailOnError
    
    CurrentDb.Execute "DELETE * FROM TblOffer " & _
    " Where [ID] = " & Forms!frmOffer!ID, dbFailOnError


Me!CurrOffer.Requery
        
        DoCmd.SetWarnings (True)

    Else

        DoCmd.Beep

    End If

        Forms!frmOffer.Requery

        DoCmd.SetWarnings True

Exit_Status_Change:
    Exit Sub
    
Err_Handler:
 MsgBox Err.Description
 Resume Exit_Status_Change

 End If
End Sub

[/code]



I was hoping someone could possible assit where i might be going wrong,
 




 8 Posts in Topic:
Docmd.Setwarning False Not Working
=?Utf-8?B?U04=?= <SN@[  2008-08-06 01:24:00 
Re: Docmd.Setwarning False Not Working
"Allan Murphy"   2008-08-06 20:04:35 
Re: Docmd.Setwarning False Not Working
"Linq Adams via Acce  2008-08-06 14:21:55 
Re: Docmd.Setwarning False Not Working
=?Utf-8?B?U04=?= <SN@[  2008-08-07 01:55:00 
Re: Docmd.Setwarning False Not Working
"Douglas J. Steele&q  2008-08-07 07:26:08 
Re: Docmd.Setwarning False Not Working
=?Utf-8?B?U04=?= <SN@[  2008-08-08 06:48:01 
Re: Docmd.Setwarning False Not Working
"Douglas J. Steele&q  2008-08-08 11:56:27 
Re: Docmd.Setwarning False Not Working
=?Utf-8?B?U04=?= <SN@[  2008-08-18 06:53:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 20:02:37 CST 2008.