Please follow the link for the same if you are not using an EDT with FormRef property attached for the lookup.

http://tech.alirazazaidi.com/how-to-use-ax-form-as-lookup-in-dynamics-ax-2012/

Additionally you need to add the below code in lookup method of the control

public void lookup()
{
element.CustomerLookUp(this);
// super();
}

Args args;
Object formRun;
args = new Args();
args.name(formStr(VendTableLookup));
args.caller(this);
formRun = classfactory.formRunClass(args);
formRun.init();
this.performFormLookup(formRun);