M
Malcolm Andersson
Hey all. I posted here earlier about executing multiple queries with one
push of a button.
I got a great answers that worked from Allen Browne and Geof Wyght.
And now I what to expand this code as to staring a macro too. Here's the
code these gentleman so kindly provided me help on and the code I want to
extend:
<--start of code-->
Private Sub Spara_knapp_Click()
On Error GoTo Err_Spara_knapp_Click
Dim db As DAO.Database
Set db = DBEngine(0)(0)
db.Execute "Fr-LäggTillÄgare ", dbFailOnError
db.Execute "Fr-LäggTillDjur ", dbFailOnError
db.Execute "Fr-RensaBuffert ", dbFailOnError
Set db = Nothing
Exit_Spara_knapp_Click:
Exit Sub
Err_Spara_knapp_Click:
MsgBox Err.Description
Resume Exit_Spara_knapp_Click
End Sub
<--end of code-->
After "Fr-RensaBuffert" and want to start the macro "Mkr-OpenForm" Which
closes the current form and opens a new one.
Thanks in advance!
Malcolm
push of a button.
I got a great answers that worked from Allen Browne and Geof Wyght.
And now I what to expand this code as to staring a macro too. Here's the
code these gentleman so kindly provided me help on and the code I want to
extend:
<--start of code-->
Private Sub Spara_knapp_Click()
On Error GoTo Err_Spara_knapp_Click
Dim db As DAO.Database
Set db = DBEngine(0)(0)
db.Execute "Fr-LäggTillÄgare ", dbFailOnError
db.Execute "Fr-LäggTillDjur ", dbFailOnError
db.Execute "Fr-RensaBuffert ", dbFailOnError
Set db = Nothing
Exit_Spara_knapp_Click:
Exit Sub
Err_Spara_knapp_Click:
MsgBox Err.Description
Resume Exit_Spara_knapp_Click
End Sub
<--end of code-->
After "Fr-RensaBuffert" and want to start the macro "Mkr-OpenForm" Which
closes the current form and opens a new one.
Thanks in advance!
Malcolm