Dlookup Question!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My table has a foreign key AcctID. My report is based on that table that has
the foreign key, I would like to put the address of that AcctID on the report.

I have the following statement, but its incomplete

=IIf([AcctNeeded]=True,DLookUp("[AcctAddress]","tblAcctInformation","[AcctID]"))
 
JOM,

Why not just bring the AcctAddress field into the query which serves as the
recordsource for your report?

As an aside, did you ever get your other problem resolved?

Brian



JOM said:
My table has a foreign key AcctID. My report is based on that table that has
the foreign key, I would like to put the address of that AcctID on the report.

I have the following statement, but its incomplete
=IIf([AcctNeeded]=True,DLookUp("[AcctAddress]","tblAcctInformation","[AcctID
]"))
 
My other question was not resolved

My report's record source is based on the table and not from a query.......

Brian Bastl said:
JOM,

Why not just bring the AcctAddress field into the query which serves as the
recordsource for your report?

As an aside, did you ever get your other problem resolved?

Brian



JOM said:
My table has a foreign key AcctID. My report is based on that table that has
the foreign key, I would like to put the address of that AcctID on the report.

I have the following statement, but its incomplete
=IIf([AcctNeeded]=True,DLookUp("[AcctAddress]","tblAcctInformation","[AcctID
]"))
 
JOM,

What I'd do is change your report's recordsource to a query based on your
table. Open your report in design view and bring up its property sheet. On
the 'All' tab, click on recordsource to display the Build button [...] to
the far right. Select your table from the 'Show Table' window. Assuming the
Address is in a separate table, select that other table as well. Join the
tables if it hasn't already been done for you. (You may need to edit the
Join properties from 'INNER JOIN' to an OUTER JOIN). Now you can pull down
all fields you wish to report on, including the Address. Run the query to
make sure you're getting the desired results. Then make sure you have a text
control on your report with the address as its control source.

I've got to get ready for dinner. I'll check back later this evening, and
will hopefully get to your other issue unless someone beats me to it.

Brian


JOM said:
My other question was not resolved

My report's record source is based on the table and not from a query.......

Brian Bastl said:
JOM,

Why not just bring the AcctAddress field into the query which serves as the
recordsource for your report?

As an aside, did you ever get your other problem resolved?

Brian



JOM said:
My table has a foreign key AcctID. My report is based on that table
that
has
the foreign key, I would like to put the address of that AcctID on the report.

I have the following statement, but its incomplete
=IIf([AcctNeeded]=True,DLookUp("[AcctAddress]","tblAcctInformation","[AcctID
]"))
 
Thanks brian, will do so, will you get a chance to help me with the other
issue that I had?

Brian Bastl said:
JOM,

What I'd do is change your report's recordsource to a query based on your
table. Open your report in design view and bring up its property sheet. On
the 'All' tab, click on recordsource to display the Build button [...] to
the far right. Select your table from the 'Show Table' window. Assuming the
Address is in a separate table, select that other table as well. Join the
tables if it hasn't already been done for you. (You may need to edit the
Join properties from 'INNER JOIN' to an OUTER JOIN). Now you can pull down
all fields you wish to report on, including the Address. Run the query to
make sure you're getting the desired results. Then make sure you have a text
control on your report with the address as its control source.

I've got to get ready for dinner. I'll check back later this evening, and
will hopefully get to your other issue unless someone beats me to it.

Brian


JOM said:
My other question was not resolved

My report's record source is based on the table and not from a query.......

Brian Bastl said:
JOM,

Why not just bring the AcctAddress field into the query which serves as the
recordsource for your report?

As an aside, did you ever get your other problem resolved?

Brian



My table has a foreign key AcctID. My report is based on that table that
has
the foreign key, I would like to put the address of that AcctID on the
report.

I have the following statement, but its incomplete


=IIf([AcctNeeded]=True,DLookUp("[AcctAddress]","tblAcctInformation","[AcctID
]"))
 
jisuanji test
JOM said:
My table has a foreign key AcctID. My report is based on that table that has
the foreign key, I would like to put the address of that AcctID on the report.

I have the following statement, but its incomplete
=IIf([AcctNeeded]=True,DLookUp("[AcctAddress]","tblAcctInformation","[AcctID
]"))
 
Back
Top