Is there a way to display either the query sql statement or query name as a field in a report?
M mnoll Apr 6, 2009 #1 Is there a way to display either the query sql statement or query name as a field in a report?
F fredg Apr 6, 2009 #3 Is there a way to display either the query sql statement or query name as a field in a report? Click to expand... 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.
Is there a way to display either the query sql statement or query name as a field in a report? Click to expand... 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 Apr 6, 2009 #4 You could use a calculated field like this -- My_Query_Name: "The query is named XyZ_Code"
J Jacqueline Apr 7, 2009 #5 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? Click to expand... Click to expand...
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? Click to expand... Click to expand...
M mnoll Apr 9, 2009 #6 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? Click to expand... Click to expand...
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? Click to expand... Click to expand...