Print Preview in embedded macro on Switchboard not working

Diana van den Berg
4StarLounger
Posts: 582
Joined: 06 May 2012, 20:05

Print Preview in embedded macro on Switchboard not working

Post by Diana van den Berg »

TO GET REPORTS OPENING IN PRINT PREVIEW FROM THE SWITCHBOARD, I:

(See attachment)

1. in Design View of the switchboard, right-click on the button for the menu options
2. select Properties/Event/On Click (embedded macro)
3. click on the 3 dots
4. scroll to the bottom of the macro
5. click on the down arrow of Add New Action
6. select Open Report
7. for Report Name, type: [Argument]
8. for View, select: Print Preview
9. for Filter Name and Where Condition I leave both blank
10. for Window Mode I live it on Normal
11. then close everything saving it as I go
12. go out of the database and come into it again and test.
13. also have the Properties/All of each report set to open in Print Preview

SOMETIMES IT WORKS AND SOMETIMES NOT, BUT

1. the ones that don’t work are identical to the ones that do
2. I check that I have got the Open Report action saved properly. Sometimes it has not been and then I redo it and make sure that iit has been saved correctly.

I don’t know why it doesn’t always work.

Thank you for any help.
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78608
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Print Preview in embedded macro on Switchboard not worki

Post by HansV »

The macro for the On Click action of Option1 should contain a series of blocks that look like

Code: Select all

If [Command]=… Then
    …
    StopMacro
End If
Each value of Command starts a different action.
This is the block I have for reports (Command = 4):
S3055.png
There shouldn't be an Open Report action elsewhere in the macro.
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

Diana van den Berg
4StarLounger
Posts: 582
Joined: 06 May 2012, 20:05

Re: Print Preview in embedded macro on Switchboard not worki

Post by Diana van den Berg »

Thank you, Hans. That is what I have got. I am thinking that perhaps I haven’t made any mistakes and that one database is corrupted. I have a backup created by the system in that folder which supports that and perhaps I was in the switchboard when load-shedding of electricity happened or something. I think that perhaps all the rest of the databases that have the problem were various saves of that one.

I am going to delete the switchboard and switchboard items in the copy that I am working on at the moment and do it again. If that doesn’t work, I am going to open an empty database and if thjat doesn’t work, I am going to create a new database and import everything except the switchboard and switchboar items and redo them there.

However, I will have to do that tomorrow because I have a lot of things I need to do before I go to my son’s for supper.

Thank you for confirming that I haven’t done anything wrong and helping me to realise that I think the switchboard is corrupted.

My internet connections are playing up and I may not be able to get in here again this afternoon before I switch off the computer.