I've tried everything to get this to work. I must be missing some fundamental concept.
I'm attempting to use the DLookup function as an expression in a textbox in a form. I have been placing the following text into the "Control Source" field of the text box.
Ghost is the name of the table.
Status is the name of the results column on the Ghost table.
Subpoena ID is the name of the value column on the Ghost table.
Ghost2 is the name of the form.
Combo is the name of the dropdown box on the Ghost2 form.
So I basically want the textbox to look up the adjacent column ("Status") of the "Subpoena ID" in the dropdown menu (combo). I am consistently getting a #Error message. Can anyone tell me what I'm doing wrong?
I'm attempting to use the DLookup function as an expression in a textbox in a form. I have been placing the following text into the "Control Source" field of the text box.
Code:
=DLookUp("[Status]","Ghost","[Subpoena ID] =" & Forms![Ghost2]!Combo)
Ghost is the name of the table.
Status is the name of the results column on the Ghost table.
Subpoena ID is the name of the value column on the Ghost table.
Ghost2 is the name of the form.
Combo is the name of the dropdown box on the Ghost2 form.
So I basically want the textbox to look up the adjacent column ("Status") of the "Subpoena ID" in the dropdown menu (combo). I am consistently getting a #Error message. Can anyone tell me what I'm doing wrong?