I have two reports (Keys & Info) with a customized Toolbar which includes an "Exit" button and this "Exit" button was tied to a macro called "MM.ExitBtn". These reports get opened via Menu Form X.
I later introduced a Menu Form Y to selectively preview print records using form "Info".
I then converted the macro to a VBA Event Procedure and with the report "Info" displayed in Design mode I changed the Customized Exit Button to link to the Event Procedure. And I deleted the MM macro.
When I open the "Info" report from Menu Form Y, the Exit button works beatifully. But if the "Keys" or the "Info" reports are opened from Menu Form X, the Exit button results in "MS Access can't find the Macro MM."
In all three cases the report is opened in the same way except for a Selection Condition when opened from Menu Form Y, i.e.,
From Menu For X:
DoCmd.OpenReport "Keys", acPreview
DoCmd.OpenReport "Info", acPreview
From Menu Form Y:
DoCmd.OpenReport "Info", acViewPreview, , "[keyid] = [Forms]![SelSol].[SelKey]"
The Customized Toolbar in both reports is from the same source - "Custom 1"
What's wrong? Can anyone help? Please.
Dummy99
I later introduced a Menu Form Y to selectively preview print records using form "Info".
I then converted the macro to a VBA Event Procedure and with the report "Info" displayed in Design mode I changed the Customized Exit Button to link to the Event Procedure. And I deleted the MM macro.
When I open the "Info" report from Menu Form Y, the Exit button works beatifully. But if the "Keys" or the "Info" reports are opened from Menu Form X, the Exit button results in "MS Access can't find the Macro MM."
In all three cases the report is opened in the same way except for a Selection Condition when opened from Menu Form Y, i.e.,
From Menu For X:
DoCmd.OpenReport "Keys", acPreview
DoCmd.OpenReport "Info", acPreview
From Menu Form Y:
DoCmd.OpenReport "Info", acViewPreview, , "[keyid] = [Forms]![SelSol].[SelKey]"
The Customized Toolbar in both reports is from the same source - "Custom 1"
What's wrong? Can anyone help? Please.
Dummy99