Hi All,
I am a complete newb with Access 2007 (or any access) and am having problems writing a dlookup function. heres the whole story:
Form1 is bound to table TSDETAIL. On form1, I have an unbound combo box (called COMBO0) where the user selects EMPID from table EMPLOYEE. I also have an unbound textbox which I want to display field FNAME from table EMPLOYEE where the EMPID equals the one selected in the combo box. In the expression builder for the Control Source of the text box i inserted the following formula:
but obviously something is wrong. I can't figure out the right syntax for this seemingly simple problem for the life of me, and have tried searching countless forums without success. Any/All help will be greatly appreciated, and will be repaid with my undying gratitude (although a shiny lamborghini would be more fitting, unfortunately thats all I have to offer)
-Shaun
I am a complete newb with Access 2007 (or any access) and am having problems writing a dlookup function. heres the whole story:
Form1 is bound to table TSDETAIL. On form1, I have an unbound combo box (called COMBO0) where the user selects EMPID from table EMPLOYEE. I also have an unbound textbox which I want to display field FNAME from table EMPLOYEE where the EMPID equals the one selected in the combo box. In the expression builder for the Control Source of the text box i inserted the following formula:
Code:
=DLookUp([EMPLOYEE]![FNAME],"EMPLOYEE",[EMPID]=[Combo0])
but obviously something is wrong. I can't figure out the right syntax for this seemingly simple problem for the life of me, and have tried searching countless forums without success. Any/All help will be greatly appreciated, and will be repaid with my undying gratitude (although a shiny lamborghini would be more fitting, unfortunately thats all I have to offer)
-Shaun