Save Recordset without msgbox

waq963

Registered User.
Local time
Today, 21:03
Joined
Jan 27, 2009
Messages
84
Hi, i have a form where a user enters their details and when they click save a msgbox appears with a yes or no(vbOKCancel). Is it possible to save without the msgbox but have confirmation message as a label or msgbox that does not require clicking?
 
What message box appears?

Try setting DoCmd.SetWarnings False before the update and DoCmd.SetWarnings True after the update.
 
Hi, i can't do a before update or after update for the command button.This is the code i have at the moment behind the button.

Dim rstAddQ As DAO.Recordset
Set rstAddQ = dbase.OpenRecordset("tblAQ", dbOpenDynaset)
If isNull(txta.Value) Then
MsgBox "hhhhhh", vbExclamation, "Cannot Save"
ElseIf MsgBox("Save ?", vbOKCancel, "Confirmation") = vbOK Then
rstAddQ.AddNew
rstAddQ("AQID") = newNumber0("AQ")
rstAddQ("Q") = txtQ1.Value
rstAddQ.Update
rstAddQ.Bookmark = rstAddQ.LastModified
End If
 
Message boxes are as they imply message boxes which rely on user intervention to acknowledge the existance of them and to respond accordingly. If you want to remove the confirmation that the record is about to be saved then remove the command line. To simulate a message box that does not require user intervention you will have to create one yourself.

Here is a very simple aproach to what you want.

David
 

Attachments

Last edited:
Could you tell me which type of msgbox please? Because there are several types.
 

Users who are viewing this thread

Back
Top Bottom