Log In    |    Knowledge Base    |    4D Home
Tech Tip: When not to use the Dialog command
Published On: April 23, 1999

4D Technical Support occasionally gets a call from a 4D developer whose sub form or field doesn't work in a particular Window. All the object and form properties are correct, but the user is unable to get the sub form or field to do anything.

The problem is usually that the window was opened with the Dialog command. To avoid this problem, remember that the only things a user can change in a Dialog are variables. Sub forms and fields won't work.

If you need a user to be able to manipulate fields or sub forms in a window, without creating a new record, you will have to use another command, such as Add Record. It is quite acceptable to call Add Record to do this, and to make all the buttons which close the form issue a Cancel. The effect is very similar to the dialog command in this case.