Share via

Access function to return query name in the query results

Anonymous
2018-10-18T07:10:54+00:00

Hello,

Does anyone know if there is a way to return in the results of a query the query name ? Is there a function to return this result ? I have tried dlookup but cannot find any right arguments to achieve that, maybe not supported by the specific function ?

Thanks in advance

Dimitris

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Duane Hookom 26,825 Reputation points Volunteer Moderator
    2018-10-18T12:45:21+00:00

    I'm having trouble understanding a business case for changing query names.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2018-10-18T07:37:02+00:00

    Thanks Hans.

    The problem I am trying to avoid is if & when the name of the query is changed and the best option I have figured until now is to enter a parametric field where I input manually the query name but that's obviously not a very good solution.

    It is a pity there is no option to address this issue because I want this info in my reports to easily find the query name that generated the report results that I transfer to Excel.

    Thanks anyway !

    Was this answer helpful?

    0 comments No comments
  3. HansV 462.6K Reputation points
    2018-10-18T07:14:19+00:00

    There is no support for this. If you really need this, you'll have to manually add a column, for example:

    QueryName: "MyQuery"

    It is up to you to enter the correct name, and to update it if you change the name of the query.

    Was this answer helpful?

    0 comments No comments