How to close a form

Hallo everybody, I’m very new in Navision.

I created 2 forms (a list and a card)

In each form I have a menu button and I can switch from the list to the chart and viceversa.

Now my question is: is it possible to close the actual form when I want to pass to the other?

At the moment when I switch from the card to the list the card form remains opened, I want to close it.

Thank you very much

Max

Welcome to DUG

Why do you need this behaviour?

How are you opening the card and list forms? via code or properies?

Hallo, I just open the card and the form via menu button (I created a new menu item with action runObject -->open the form).

Thank you Max

I tryed also to create a button with this c/ca code:

- OnPush()
CurrForm.CLOSE;
FORM.RUN(50002);

the form closed, but the other form (50002) doesn’t open.
I tryied also with RUNMODAL but it tells me that I cannot close the current form because it is blocked by the other.
Thank you Max

Instead of writing code use the property & on the push button write code currform.close.

I tried this on item card->Item Menu Button->List (OnPush).
List form opens & Item Card gets closed.

Try it.

Same Post in mibuso → http://www.mibuso.com/forum/viewtopic.php?f=23&t=57327&p=275858#p275858

thank you for your answer.

The problem is that I cannot understand where I have to use this & property?

Is there maybe a guide explaining that?

Thank you Max

Check the Standard Forms & their menu’s.