Hello All, I am having a DLookup problem with a Main Form | SubForm

SheaLee

Registered User.
Local time
Today, 09:05
Joined
Dec 22, 2005
Messages
40
Problem with a DLookUp.
I am currently working in MS Access 2007 and I attached the following code to a unbound text box which is located on a tab control

=DLookUp("[ProdSpecAdr]","t_Suppliers","[pk_SUP_id] =" & [Forms]![f_DE_CPN]![fk_SUP_id])

Everything was working great till I placed this form onto another form making it a Subform... and now my unbound text box is displaying the following......#Name?

Could use some help I've been looking for a fix for awhile now, thanks in advance.
 
However it is advisable to solve the criteria part before using the Dlookup function...In your case try to store the value of

[pk_SUP_id] =" & [Forms]![f_DE_CPN]![fk_SUP_id]

into a seperate variable and then pass it to the DLookup as a parameter...

Hope sounds a bell...Order of Evaluation...
 
That's a new one on me. How exactly would you do that?
 
That's a new one on me. How exactly would you do that?

My advice was in conjunction with yours...as ain't got a clue which form is Shealee in and which form is (s)he referencing from...

I seek most of the help from this forum How ever even I wasn't convinced but it somehow worked for me...

Look Here and here
 

Users who are viewing this thread

Back
Top Bottom