KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: "Command can't be used" Error with PRINT SELECTION
PRODUCT: 4D | VERSION: | PLATFORM:
Published On: September 29, 2000
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

If you have a button on an output form that calls the PRINT SELECTION command, and when you try and print the form you get the following error message:

screen shot

Clicking 'Continue' causes the print job to finish successfully. This is because the On Header, On Printing Break, On Printing Detail and/or On Printing Footer events are turned on for the button (depending on which section of the form the button is located in). So during the initial PRINT SELECTION command a second call to the object method is being triggered - this is the source of the "This command can't be used because a record of the table [People] is in a form" error. Go to the Events tab of the Object Properties dialog for the button and turn off all events except for "On Clicked" to prevent this error from occuring.