Is DLOOKUP the best choice?

  • Thread starter Thread starter FSUrules2883
  • Start date Start date
F

FSUrules2883

I am trying to use a DLOOKUP in a report To lookup a value in a
stored
query from information that is the report. I have a report that
gives
me a customers parent account name and I am trying to then use that
parent account name to look up a comment stored in another query.
This is how my formula looks

=DLookUp("TXTFIELD","Query","Query.ParentAccount"="ParentAccountFromReport"­)


Any sugesstions?
 
You'd likely be better off using a query that combines the two tables, and
use that table as as the RecordSource for your report.

As it stands, your syntax is incorrect: the equal sign needs to be in
quotes, and, unless ParentAccountFromReport is a constant text value, you
don't want quotes around it:

=DLookUp("TXTFIELD","Query","Query.ParentAccount=" &
ParentAccountFromReport)


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


I am trying to use a DLOOKUP in a report To lookup a value in a
stored
query from information that is the report. I have a report that
gives
me a customers parent account name and I am trying to then use that
parent account name to look up a comment stored in another query.
This is how my formula looks

=DLookUp("TXTFIELD","Query","Query.ParentAccount"="ParentAccountFromReport"­)


Any sugesstions?
 
You'd likely be better off using a query that combines the two tables, and
use that table as as the RecordSource for your report.

As it stands, your syntax is incorrect: the equal sign needs to be in
quotes, and, unless ParentAccountFromReport is a constant text value, you
don't want quotes around it:

=DLookUp("TXTFIELD","Query","Query.ParentAccount=" &
ParentAccountFromReport)


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


I am trying to use a DLOOKUP in a report To lookup a value in a
stored
query from information that is the report. I have a report that
gives
me a customers parent account name and I am trying to then use that
parent account name to look up a comment stored in another query.
This is how my formula looks

=DLookUp("TXTFIELD","Query","Query.ParentAccount"="ParentAccountFromReport"­)


Any sugesstions?
 
I am trying to use a DLOOKUP in a report To lookup a value in a
stored
query from information that is the report. I have a report that
gives
me a customers parent account name and I am trying to then use that
parent account name to look up a comment stored in another query.
This is how my formula looks

=DLookUp("TXTFIELD","Query","Query.ParentAccount"="ParentAccountFromReport"­)


Any sugesstions?

Add the query to the RecordSource of the report and the value will be available.
 
Back
Top