I created a Macro in MS Access 2010 for the OnLoad event of a report that hides a subform on the report if a check box on the report is not checked. That works fine but what I am trying to do now is have the same thing happen when I click the button that activates a macro calling the EMailDatabaseObject function that generates an email with a pdf of the report attached. The email with the attached pdf works fine but the macro doesn't run.
What event do I attach the macro to so that it happens when it is outputted to pdf?
Move the existing macro from the On Load event to the On Open event of the report.
Related
I have written MS Access VBA code.
I have written License code in Form_Open Event. License code is available in the registry. During opening the form, the registry value will be compared with the hard coded value inside the code. If both are same, then it will open the form. If both value are not same, It will displayed the message and close the Access application(Application.Quit), You are not authenticated to use the tool.
Now I forgot the password in the VBA code.
As soon as open the form, due to both value are mismatched, Modal message box is displayed and I could not open the VBA code at all.
I do not know how to disable the Form_Open event.
Please help me to disable the Form_Open event, and open the VBA code.
Hold the Shift key pressed when opening the database to prevent the automatic execution of code or opening of forms.
Then you can open the form in Design view and its code.
I have an Access database than when opened it shows a form, however, this is not a switchboard and I can not see an Autoexec macro that is doing this. Is there any other way a designated form can be display on start up? What am I missing.
We have Order DB in Access where we collect and send Order confirmation to Clients. In Order Form I click button to open Confirmation Report in Normal view. I have "Send Report" button on opened report to send it to Client in PDF format.
All works grate with small reports. Problem arrise when report has 15-20 or more pages. After some investigation I found out that at time of report load user press Send button and report simply not being fully formated and sending action just fails.
I cannot find correct event to check if report is finished formatting. It would help me to make Send button enabled true/false based on that status.
May be you can use 'OnPrint' event of the report footer's section: "event occurs after data in a report section is formatted for printing, but before the section is printed"
I solved it at last.
switched on docmd.Hourglass before button which opens the Report (button is located on Order Form) and switched off docmd.Hourglass on exit sub.
in OnClick event of "Send" button at the top did the check for MousePointer
If Screen.MousePointer = 11 Then Exit Sub
Now User is not able to start sending until all process of button on Order Form is finished. That is actualy strange but somehow it solved the issue. Thank you all for help!
I have a form that has the navigate buttons on the bottom.
I would like to run some code every time the user navigates to a different record.
Under which event handler would I place this code? Form_OnLoad only runs the code when I open the form. I'm a bit lost. Thanks!
You should use the Current Event.
Suppose a report is rendered on the Report Server when a user saves it in Excel format.
The user then opens the report. All hyperlinks and drill down in the report are available in Excel, but if user clicks on it, it opens the result in a web browser.
How to restrict these hyperlinks while exporting to Excel from report Server?
You can use an expression in the ACTION - GO TO REPORT option
=IIf(Globals!RenderFormat.IsInteractive, "Your Report", Nothing)
this will remove the hyperlinks for Excel and PDF exports