Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Magic Queries

Status
Not open for further replies.

CylonLove4Life

Technical User
Feb 15, 2005
53
ES
I'm showing a bunch of "magic queries" with names like:

~sq_cfrmSetGraphicReport~sq_clstLocations
~sq_cfrmSetGraphicReport~sq_clstMaps
~sq_dADTReport~sq_dADTSubReportAM
~sq_dADTReport~sq_dADTSubReportPM

I can view them using the QueryDefs collection. And sometimes I get error messages from them.

What are they? Where do they come from? How come they don't show up in the Queries tab in the main Access window?

 
These are system queries, for such things as forms, reports, combo boxes etc. You will find them listed in the MSysObjects table with more detail in the MSysQueries table.
 
I see. Do you know the naming convention? What sq_d and sq_c are?
 
I can't say I know, but from observation I can say:

~sq_f
Form or subform based on table or query that has not been saved. If the form is based on a saved query, it does not have a system query entry.

~sq_r
Report based on table or query that has not been saved. If the report is based on a saved query, it does not have a system query entry.

~sq_c
Something that involves a query on a form, regardless of what type (system or saved) of query. This would include:
~sq_cMainFormName~sq_cSubformName
~sq_cMainFormName~sq_cComboName
~sq_cMainFormName~sq_cListName

~sq_d
Something that involves a query on a report, regardless of what type (system or saved) of query. This would include:
~sq_dMainReportName~sq_dSubreportName
~sq_dMainReportName~sq_dComboName
~sq_dMainReportName~sq_dListName

All of which is open to contradiction and correction.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top