Using Reports with multiple sources

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

Guest

I am creating a report. I have bound it to particular macro. However, I need
to create a textBox which takes its data from a separate source being a
query. I am not sure How to bound this textBox to this query ( which is
separate from the original Report source )

Any suggestions.
 
Use a dlookup function, Here is an example:

=DLookUp("SumOfTOTALHOURS","[842-2486]","SumOfTOTALHOURS > 0")
"SumOfTOTALHOURS" is the feild in the query.
"[842-2486]" is the name of the query.
"SumOfTOTALHOURS > 0" is an optional conditional statement.

Place this in the control source of the textbox.

the only drawback to this is that you must do this for each textbox you want
to display data from for a different source other than what your report is
based upon, I.E. if you need 30 textboxes displaying data from 30 queries or
different tables, the you must use the dlookup function in each textbox,
citing the different tables or queries.
Let me know if this works for you.
 
Thanks Mike.

It works and is helpful.

cheers,

dhaval

Mike said:
Use a dlookup function, Here is an example:

=DLookUp("SumOfTOTALHOURS","[842-2486]","SumOfTOTALHOURS > 0")
"SumOfTOTALHOURS" is the feild in the query.
"[842-2486]" is the name of the query.
"SumOfTOTALHOURS > 0" is an optional conditional statement.

Place this in the control source of the textbox.

the only drawback to this is that you must do this for each textbox you want
to display data from for a different source other than what your report is
based upon, I.E. if you need 30 textboxes displaying data from 30 queries or
different tables, the you must use the dlookup function in each textbox,
citing the different tables or queries.
Let me know if this works for you.

Dhaval said:
I am creating a report. I have bound it to particular macro. However, I need
to create a textBox which takes its data from a separate source being a
query. I am not sure How to bound this textBox to this query ( which is
separate from the original Report source )

Any suggestions.
 
Back
Top