Hi all,
I have a request to design a form containing a subform (NAV 5.01). The subform is a copy of form 29 Vendor Ledger Entries.
The thing is, that the subform should not show any data upon opening the form. Not until the user has inserted certaing search requirements snd pressed a search button, data should be shown.
I looked in the properties of both my forms, but don't seem to be able to find a way to prevent data to be loaded automatically. How do I do this?
/G
0
Comments
there r multiple way to handel it i have to try for best if u could understand it clearly.
which table used in header and what type of search button have u used. need some details.
Create some functions in the subform that are called from the main form. These fill up the temptable of the subform to show the data.
On opening of the form, the subform will be empty in this way. In some "refresh"-button, you can call the subform to fill up the temptable and to show it.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Thanks for your replies.
Main form is on table Vendor Ledger Entry.Button is a regular button. I have inserted a simple quick mockup showing how the window could end looking.
Would appreciate all the help you can spare on this one.
What I wud do is:
on Openform() of header form
--> CurrForm.subformname.VISIBLE:=FALSE;
and OnAfterGetRecord() of header form
-->IF "Entry No." <> xRec."Entry No." THEN
CurrForm.subformname.VISIBLE:=FALSE;
and OnPush() of the search button:
--> CurrForm.subformname.VISIBLE:=TRUE;
Hope this helps....:)
RIS Plus, LLC
MVP - Business Apps
Hi suvidha,
Thanks for your suggestion. Being a total newbie at this I tried your suggestion, but receive the following error...:
"You have specified an unknown variable. Define the variable under 'Global C/AO symbols'.
...and that's strange, because I already did create a new Global Variable with Name "Name of subform", Data type "Form" and Subtype "Name of subform".
Any suggestions? What am I missing?
/G
subformname is not a global variable.
On the subform---> Properties-->Name:subformname needs to be specified.
Yes, indeed that's how you would normally work in Navision, but this is a special customer with an extensive number of customizations and some of their vendors have millions of lines, so we need a way to refine the search before openeing any posts.
/G
So you have the main form based on Vendor Ledger Entry, and you also have a subform also based on the Vendor Ledger Entry? Why go with a subform? You could just have the main form and apply filters, that way you don't have to worry about form links, where code goes, how to call subform logic from the main form, it would be a much less complex form.
RIS Plus, LLC
MVP - Business Apps
Nope, didn't try your suggestion yet, but thanks for pointing out this solution to me. I think I'll give it a test.