RabSwinney
Technical User
Hi There, how can I get a module to run automaticaly, can you have a look at my code and tell me what I need at the start. I will use the module with the Autexec Macro.
Sub run()
DoCmd.OpenReport "Rpt_GB01 Ex Pefc and Fsc", acViewPreview, "", "", acNormal
DoCmd.SetWarnings (False)
DoCmd.OutputTo acReport, "Rpt_GB01 Ex Pefc and Fsc", "SnapshotFormat(*.snp)", "\\Fftilsmb3002\production\Intranet\Planning\Non_Utilised_RawMaterial\Rpt_GB01 Ex Pefc and Fsc.snp", False, "", 0
DoCmd.SetWarnings (False)
DoCmd.Close acReport, "Rpt_GB01 Ex Pefc and Fsc"
DoCmd.OpenReport "Rpt_GB02 Ex Pefc and Fsc", acViewPreview, "", "", acNormal
DoCmd.SetWarnings (False)
DoCmd.OutputTo acReport, "Rpt_GB02 Ex Pefc and Fsc", "SnapshotFormat(*.snp)", "\\Fftilsmb3002\production\Intranet\Planning\Non_Utilised_RawMaterial\Rpt_GB02 Ex Pefc and Fsc.snp", False, "", 0
DoCmd.SetWarnings (False)
DoCmd.Close acReport, "Rpt_GB02 Ex Pefc and Fsc"
DoCmd.OpenReport "Rpt_GB03 Ex Pefc anf Fsc", acViewPreview, "", "", acNormal
DoCmd.SetWarnings (False)
DoCmd.OutputTo acReport, "Rpt_GB03 Ex Pefc anf Fsc", "SnapshotFormat(*.snp)", "\\Fftilsmb3002\production\Intranet\Planning\Non_Utilised_RawMaterial\Rpt_GB03 Ex Pefc and Fsc.snp", False, "", 0
DoCmd.SetWarnings (False)
DoCmd.Close acReport, "Rpt_GB03 Ex Pefc anf Fsc"
DoCmd.OpenReport "Rpt_GB11 Ex Pefc anf Fsc", acViewPreview, "", "", acNormal
DoCmd.SetWarnings (False)
DoCmd.OutputTo acReport, "Rpt_GB11 Ex Pefc anf Fsc", "SnapshotFormat(*.snp)", "\\Fftilsmb3002\production\Intranet\Planning\Non_Utilised_RawMaterial\Rpt_GB11 Ex Pefc and Fsc.snp", False, "", 0
DoCmd.SetWarnings (False)
DoCmd.Close acReport, "Rpt_GB11 Ex Pefc anf Fsc"
DoCmd.OpenReport "Rpt_GB12 Ex Pefc anf Fsc", acViewPreview, "", "", acNormal
DoCmd.SetWarnings (False)
DoCmd.OutputTo acReport, "Rpt_GB12 Ex Pefc anf Fsc", "SnapshotFormat(*.snp)", "\\Fftilsmb3002\production\Intranet\Planning\Non_Utilised_RawMaterial\Rpt_GB12 Ex Pefc and Fsc.snp", False, "", 0
DoCmd.SetWarnings (False)
DoCmd.Close acReport, "Rpt_GB12 Ex Pefc anf Fsc"
End Sub
Sub run()
DoCmd.OpenReport "Rpt_GB01 Ex Pefc and Fsc", acViewPreview, "", "", acNormal
DoCmd.SetWarnings (False)
DoCmd.OutputTo acReport, "Rpt_GB01 Ex Pefc and Fsc", "SnapshotFormat(*.snp)", "\\Fftilsmb3002\production\Intranet\Planning\Non_Utilised_RawMaterial\Rpt_GB01 Ex Pefc and Fsc.snp", False, "", 0
DoCmd.SetWarnings (False)
DoCmd.Close acReport, "Rpt_GB01 Ex Pefc and Fsc"
DoCmd.OpenReport "Rpt_GB02 Ex Pefc and Fsc", acViewPreview, "", "", acNormal
DoCmd.SetWarnings (False)
DoCmd.OutputTo acReport, "Rpt_GB02 Ex Pefc and Fsc", "SnapshotFormat(*.snp)", "\\Fftilsmb3002\production\Intranet\Planning\Non_Utilised_RawMaterial\Rpt_GB02 Ex Pefc and Fsc.snp", False, "", 0
DoCmd.SetWarnings (False)
DoCmd.Close acReport, "Rpt_GB02 Ex Pefc and Fsc"
DoCmd.OpenReport "Rpt_GB03 Ex Pefc anf Fsc", acViewPreview, "", "", acNormal
DoCmd.SetWarnings (False)
DoCmd.OutputTo acReport, "Rpt_GB03 Ex Pefc anf Fsc", "SnapshotFormat(*.snp)", "\\Fftilsmb3002\production\Intranet\Planning\Non_Utilised_RawMaterial\Rpt_GB03 Ex Pefc and Fsc.snp", False, "", 0
DoCmd.SetWarnings (False)
DoCmd.Close acReport, "Rpt_GB03 Ex Pefc anf Fsc"
DoCmd.OpenReport "Rpt_GB11 Ex Pefc anf Fsc", acViewPreview, "", "", acNormal
DoCmd.SetWarnings (False)
DoCmd.OutputTo acReport, "Rpt_GB11 Ex Pefc anf Fsc", "SnapshotFormat(*.snp)", "\\Fftilsmb3002\production\Intranet\Planning\Non_Utilised_RawMaterial\Rpt_GB11 Ex Pefc and Fsc.snp", False, "", 0
DoCmd.SetWarnings (False)
DoCmd.Close acReport, "Rpt_GB11 Ex Pefc anf Fsc"
DoCmd.OpenReport "Rpt_GB12 Ex Pefc anf Fsc", acViewPreview, "", "", acNormal
DoCmd.SetWarnings (False)
DoCmd.OutputTo acReport, "Rpt_GB12 Ex Pefc anf Fsc", "SnapshotFormat(*.snp)", "\\Fftilsmb3002\production\Intranet\Planning\Non_Utilised_RawMaterial\Rpt_GB12 Ex Pefc and Fsc.snp", False, "", 0
DoCmd.SetWarnings (False)
DoCmd.Close acReport, "Rpt_GB12 Ex Pefc anf Fsc"
End Sub