I need to use the dlookup function in a subform and just can't get it to work. I have a patient form (frmPATIENT) and a subform (frmSPECIMEN). I want the discipline name displayed when the user selects the appropriate discipline (Using a toggle button of four)
=DLookUp("[DISCIPLINE_NAME]","tblDISCIPLINE","DISCIPLINE_ID=" & [Forms]![frmPATIENT]![frmSPECIMEN].[Form].[frameDISCIPLINE])
Am I referencing the form correctly? I can get it to work by just using the subform on its own (ie leaving out [frmPATIENT]) but I need to be able to put it all together. I keep getting #name displayed.
Incidentally, if there is no value, I keep getting #error but I would just like to see an empty field. How do I do this?
Your help would be very much appreciated
=DLookUp("[DISCIPLINE_NAME]","tblDISCIPLINE","DISCIPLINE_ID=" & [Forms]![frmPATIENT]![frmSPECIMEN].[Form].[frameDISCIPLINE])
Am I referencing the form correctly? I can get it to work by just using the subform on its own (ie leaving out [frmPATIENT]) but I need to be able to put it all together. I keep getting #name displayed.
Incidentally, if there is no value, I keep getting #error but I would just like to see an empty field. How do I do this?
Your help would be very much appreciated