November 10, 200421 yr Here's my problem, with my database when people want to perform a find, the layout swtiches to the main layout. But it doesn't work with all my layouts, it only works with layouts that are in browse mode, those that are in preview mode (printable ones) don't switch to the main layout, here's my script: Set Error Capture (On) If("Status(CurrentMode)=0") If("Status(CurrentLayoutName)="List" or "Help" or "Labels" or "Table"") Perform Script(Sub-Scripts, "Go to Main Layout") End if Enter Find Mode(Pause) End if ..... The layouts that are in browse mode are List, Help and Table but my Labels layout won't switch to the main layout when I perform a find. My guess is that the problem is with the mode of the layout but I cannot find the solution!! =( Anyone can give me a hand here? Thanks
November 10, 200421 yr If[ Status(CurrentLayoutName)="List" or "Help" or "Labels" or "Table" ] won't work either. If[ Status(CurrentLayoutName) = "List" or Status(CurrentLayoutName) = "Help" or Status(CurrentLayoutName) = "Labels" or Status(CurrentLayoutName) = "Table" ] will. Alternately, If [ PatternCount( "
November 11, 200421 yr Why are you adding the line: If("Status(CurrentMode)=0") ... if you want the script to also switch to Main Layout if in Preview Mode? Change that line to: If("not Status(CurrentMode)=1") Browse is 0, Find is 1 and Preview is 2. The above will switch to Main Layout except if the User is currently in Find Mode on the existing layout. Is this what you were attempting to protect against? I'm unclear why that If[] test is there at all. Then correct your script as Queue has indicated - that PatternCount is very clever and yours wouldn't work even if you fixed your Browse issue. After that, you should be in business.
November 11, 200421 yr I'm curious, are you activating this via button? If so, it wouldn't work in Preview Mode anyway since buttons are unavailable.
November 11, 200421 yr Author No Queue it's activated via a custom made menu in a custom made interface.
Create an account or sign in to comment