Lookup Field

Hello, I want to create a form and place a textbox that looks up a value in one of the master files. For that I have created a lookup tabular form. In my main form I make the textbox property as follows: Lookup → Yes LookupFormID → Newly created lookup form. On my main form if I click the lookup icon lookup form is not getting displayed. Can anybody please tell me where am I going wrong. It would also help if somebody could tell me how to create a looup field on a form. Regards Harish Sharma Edited by - hsharma on 2002 Jul 09 11:12:47

Hello! What you need to do is to go to the table you have based the new form on, and in the table properties specify your new tablular form as the form in the LookupFormID table property. You can access the table properties, by designing the table & then going to the first new blank field at the end & going View → Properties. Hope this is of help! -------------------------------- Edward Bloomfield Navision Support Consultant Cambridge Online Systems Limited www.cambridgeonline.net Edited by - EBloom on 2002 Jul 09 11:33:05

As Edvard wrote, you can add lookup & tablerelation in table design. But when this is not possible you do not have textbox sourced to table but to C/AL local or Global varible you shoud use OnLookup event of this textbox: frmYourLookUpForm.LOOKUPMODE(TRUE); IF frmYourLookUpForm.RUNMODAL = ACTION::LookupOK THEN BEGIN frmYourLookupForm.GETRECORD(recYourRecord); Text := recYourRecord.YourField; END; CLEAR(frmYourLookupForm); regards Bostjan

Hello! What you need to do is go to the textbox properties specify the table which you want to lookup in table relation property. No need of setting properties like lookup form id and all… Regards Suneetha G