Hi,
I didnt know under what section to post my question but since it involved report, form and vba I thought I post it under GENERAL, so apologize if this is not the appropriate place.
This what I am trying to do.
I have an Access Database designed using Switchboard to open different forms, reports and menu's etcc. All toobars are hid when the Database is opened. I would like to have a form (already created) that will open up when any report is opened within the database and the form will have 3 buttons Cancel, Print and Email. I already created the form with the buttons and added it to the Open event of each report within the database as shown below
Ofcourse when I click Cancel I revert to the Switchboard Main Menu (PERFECT)
I cant figure out how to make the PRINT and EMAIL buttons code to work.
An example if I have REPORT XYZ opened from the Switchboard Menu
I want frmPrintEmailPopup form to pop open up and if the individual want to PRINT or EMAIL the report then they can click on one of the buttons on frmPrintEmailPopup form, then once printed or emailed the REPORT XYZ is closed and frmPrintEmailPopup form is also closed and reverted to the Switchboard Main Menu.
Any ideas help will be greatly appreciated
Thank you
RB
I didnt know under what section to post my question but since it involved report, form and vba I thought I post it under GENERAL, so apologize if this is not the appropriate place.
This what I am trying to do.
I have an Access Database designed using Switchboard to open different forms, reports and menu's etcc. All toobars are hid when the Database is opened. I would like to have a form (already created) that will open up when any report is opened within the database and the form will have 3 buttons Cancel, Print and Email. I already created the form with the buttons and added it to the Open event of each report within the database as shown below
Code:
Private Sub Report_Open(Cancel As Integer)
If Not IsLoaded("frmSwitchboard") Then
MsgBox "Open this report using the Switchboard Form, Preview Report Section."
Cancel = True
End If
DoCmd.Close acForm, "frmSwitchboard"
DoCmd.OpenForm "frmPrintEmailPopup"
End Sub
Ofcourse when I click Cancel I revert to the Switchboard Main Menu (PERFECT)
I cant figure out how to make the PRINT and EMAIL buttons code to work.
An example if I have REPORT XYZ opened from the Switchboard Menu
Code:
Forms!frmSwitchboard.Filter = "[ItemNumber] = 1 " & "And [SwitchboardID] = 5"
DoCmd.OpenReport "ReportXYZ", acViewNormal
Any ideas help will be greatly appreciated
Thank you
RB
Last edited: