How do I perform a DLOOKUP in a Subform?

G

Guest

DLOOKUP works when used in a stand alone form, but when I make the stand
alone form a subform, the DLOOKUP only returns ERROR.
How do I correct this?
 
G

Guest

The dlookup shouldn't return error when you are using it in a sub form, can
you post the dlookup you are using, and how do you use it
If you filter the dlookup on a value from the main form, the the path should
be different

=dlookup("FieldName","TableName","FieldName=" &
Forms![MainFormName]![FieldName])

Now if you filter on a number, it should be
=Dlookup("FieldName","TableName","FieldName=" & Value )

Now if you filter on a String, it should be
=Dlookup("FieldName","TableName","FieldName='" & Value & "'")

Now if you filter on a String, it should be
=Dlookup("FieldName","TableName","FieldName=#" & Value & "#")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top