.....myCommandButton.click() local lc if somecondition lc = 'preview' else lc = 'to printer prompt' endif Report form myReport &lc