>Hi Everybody,
>What is the best way to provide the master file LookUp through textbox? For example, If the user presses F1 when he is in the CustID textbox, lookup for the customer master should appear, if in ProdId textbox, lookup for the product master should appear.
>
>Is there any way I can write a common code for this where I can pass some parameters and depending on the textbox name, respective lookup can be activated?
The common code should be saved in a class. Use a container, which can contain more than one object, depending on your needs. Use a container by all means, so you can expand later (without changing all your forms).
The lookup variables (name of table, field(s) to show user for selection) should be placed in properties.
F1 should be reserved for "Help", since this is what many users expect.
Regards, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)