Is DLOOKUP the best choice?

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?
 
D

Douglas J. Steele

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?
 
D

Douglas J. Steele

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?
 
R

Rick Brandt

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.
 
M

meu nome e lorena cristina da silva

wy may name ys



"(e-mail address removed)" escreveu:
 

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

Similar Threads

Dlookup HELP 2
Dlookup Help 5
Dlookup in Detail 7
DLookup in Query 1
DLookup in a grouped footer 4
Dlookup issue 3
DLookup different values 1
Dlookup 2

Top