Running Queries Flashcards
(5 cards)
How to set up a button to run multiple queries in a certain order
first - Go to Forms, View, Add the Button
Select the Event Tab Select "On Click" Select the three dots next to "On Click" Select add code Add the code on the back of this card Be sure to select the Other tab Change the name to something other than "Command 1"
Private Sub RunMyQueries99() DoCmd.OpenQuery ("qry_1A_Calc_Threshold") DoCmd.OpenQuery ("qry_2A_Calc_UNN1") DoCmd.OpenQuery ("qry_2B_Calc_UNN2") DoCmd.OpenQuery ("qry_2C_Add_UNN")
DoCmd.OpenQuery (“qry_3A_Calc_Change_Criteria”)
DoCmd.OpenQuery (“qry_3B_Add_Change_Criteria”)
DoCmd.OpenQuery (“qry_4A_Add_Profiles_Base”)
DoCmd.OpenQuery (“qry_4B_Add_Profiles_Calcs”)
DoCmd.OpenQuery (“qry_4C_Add_Profiles_AD”)
DoCmd.OpenQuery (“qry_5_ADDALLTAGS1”)
End Sub
How to turn warnings off in the “Do Command”
DoCmd.Setwarnings(False)
How to turn warnings on in the “Do Command”
DoCmd.Setwarinings(True)
How to print in the “Do Command”
DoComd.PrintOut acPrintall
How to format something so that it shows on the report with a comma - even though a comma is not in the underlying datat
End: FormatNumber([End2])