No Message box to show!

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

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
 
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
__________________________________________
 
Back
Top