How do you comment an MS-access Query?

前端 未结 9 1871
失恋的感觉
失恋的感觉 2020-12-29 20:04

How does one add a comment to an MS Access Query, to provide a description of what it does?

Once added, how can one retrieve such comments programmatically?

9条回答
  •  醉梦人生
    2020-12-29 20:56

    The first answer mentioned how to get the description property programatically. If you're going to bother with program anyway, since the comments in the query are so kludgy, instead of trying to put the comments in the query, maybe it's better to put them in a program and use the program to make all your queries

    Dim dbs As DAO.Database
    Dim qry As DAO.QueryDef
    
    Set dbs = CurrentDb
    'put your comments wherever in your program makes the most sense
    dbs.QueryDefs("qryName").SQL = "SELECT whatever.fields FROM whatever_table;"
    DoCmd.OpenQuery "qryname"
    

提交回复
热议问题