Append Message

Chimp8471

Registered User.
Local time
Today, 23:12
Joined
Mar 18, 2003
Messages
353
Within my database, i have a button that appends various records, this always promts me first before carrying out the function, is there away to just carry out the function without the message box appearing

Cheers

Andy
 
this is the code behind the button


Private Sub Command4_Click()
Dim StrSQL As String
StrSQL = "INSERT INTO Attend ( Attemployee, AttDate, AttType ) " _
& "SELECT " & Me![scrStudent] & " AS F1, #" _
& Format(Me![Text0], "mm/dd/yy") & "# AS F2, " & Me![scrAttend] & " AS F3;"
DoCmd.RunSQL StrSQL
End Sub

Andy
 
Private Sub Command4_Click()
Dim StrSQL As String

DoCmd.SetWarnings False

StrSQL = "INSERT INTO Attend ( Attemployee, AttDate, AttType ) " _
& "SELECT " & Me![scrStudent] & " AS F1, #" _
& Format(Me![Text0], "mm/dd/yy") & "# AS F2, " & Me![scrAttend] & " AS F3;"
DoCmd.RunSQL StrSQL

DoCmd.SetWarnings True

End Sub
 

Users who are viewing this thread

Back
Top Bottom