Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

No Message box to show!

Discussion in 'Information Technology' started by Bob, Jul 28, 2006.

Tags:
  1. Bob

    Bob
    Expand Collapse
    Guest

    If I don't want the massage box to appear just save on closing what do I
    take away;
    If MsgBox("Do You Want To Save?", vbQuestion + vbApplicationModal + vbYesNo
    + vbDefaultButton1, "Intellisoft") = vbYes Then
    ' If Me.OpenArgs = "ModifyOldInvoice" Then
    If bModify = True Then
    CurrentProject.Connection.Execute "DELETE * FROM
    tblDailyCharge WHERE InvoiceID=" & tbInvoiceID.value
    CurrentProject.Connection.Execute "DELETE * FROM
    tblAdditionCharge WHERE InvoiceID=" & tbInvoiceID.value
    bModify = False
    End If
    subSetValues
    subSetInvoiceDetailsValues
    recInvoice.Update
    End If
    'End If
    Set recInvoice = Nothing

    DoCmd.Close acForm, Me.Name

    Thanks in advance.........Bob Vance
     
  2. Loading...

    Similar Threads Forum Date
    How message of love from Sikh gurus are helping Pakistani Christians to fight forced conversions Sikh Sikhi Sikhism Oct 12, 2015
    Messages from God Sikh Sikhi Sikhism Aug 23, 2015
    Message of Guru Granth Sahib Essays on Sikhism Jan 30, 2014
    World U.N. chief's message to North Korean leader Breaking News Apr 12, 2013
    Christianity Pope Francis prays for world peace in Easter Sunday message Interfaith Dialogues Apr 1, 2013

  3. Tom Wickerath

    Tom Wickerath
    Expand Collapse
    Guest

    Hi Bob,

    It looks like you only need to comment out the first line, which reads:

    If MsgBox("Do You Want To Save?", vbQuestion + vbApplicationModal + vbYesNo
    + vbDefaultButton1, "Intellisoft") = vbYes Then

    and comment out a matching End IF statement. Try compiling your code (Debug
    > Compile ProjectName). If it compiles okay, then test it out.



    Tom Wickerath
    Microsoft Access MVP

    http://www.access.qbuilt.com/html/expert_contributors.html
    http://www.access.qbuilt.com/html/search.html
    __________________________________________

    "Bob" wrote:

    > If I don't want the massage box to appear just save on closing what do I
    > take away;
    > If MsgBox("Do You Want To Save?", vbQuestion + vbApplicationModal + vbYesNo
    > + vbDefaultButton1, "Intellisoft") = vbYes Then
    > ' If Me.OpenArgs = "ModifyOldInvoice" Then
    > If bModify = True Then
    > CurrentProject.Connection.Execute "DELETE * FROM
    > tblDailyCharge WHERE InvoiceID=" & tbInvoiceID.value
    > CurrentProject.Connection.Execute "DELETE * FROM
    > tblAdditionCharge WHERE InvoiceID=" & tbInvoiceID.value
    > bModify = False
    > End If
    > subSetValues
    > subSetInvoiceDetailsValues
    > recInvoice.Update
    > End If
    > 'End If
    > Set recInvoice = Nothing
    >
    > DoCmd.Close acForm, Me.Name
    >
    > Thanks in advance.........Bob Vance
     

Share This Page