Display query ID in report

M

mnoll

Is there a way to display either the query sql statement or query name as a
field in a report?
 
F

fredg

Is there a way to display either the query sql statement or query name as a
field in a report?

The query is the report's record source?
Using an unbound text control:

=[RecordSource]

will get the name of the query or the Record source SQL if there is no
named query.
 
K

KARL DEWEY

You could use a calculated field like this --
My_Query_Name: "The query is named XyZ_Code"
 
J

Jacqueline

This worked like a charm, thanks I have needed this for a while and just
happened to stumble across your repoonce.... I used this:

="Data Source"& " " & [RecordSource]

Simple but great! thanks

Duane Hookom said:
You can try a text box with a control source of:
=[RecordSource]

--
Duane Hookom
Microsoft Access MVP


mnoll said:
Is there a way to display either the query sql statement or query name as a
field in a report?
 
M

mnoll

thank you so much for the assistance.... just what I needed.
--
mn


Duane Hookom said:
You can try a text box with a control source of:
=[RecordSource]

--
Duane Hookom
Microsoft Access MVP


mnoll said:
Is there a way to display either the query sql statement or query name as a
field in a report?
 

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