?
Solved

Old QueryDEF values

Posted on 2011-10-19
6
Medium Priority
?
328 Views
Last Modified: 2012-05-12
I have some code that modifies query defs.   As I step through it, trying to find a problem, I am noticing that some of the query def names that cycle through a name check no longer exist in the database.  It is like there a bunch of junk in there....  the names typically begin with ~   as shown in the screenshot.  In the screenshot, some of that looks similar to  the name of and old subform "SF_COI_INS_CO_MAINT"  that is long since been deleted...


 How do I get rid of that junk?  I have already tried a compact and repair.  Thanks...
error.bmp
0
Comment
Question by:snyperj
  • 4
6 Comments
 
LVL 75
ID: 36995165
Those are actually SQL in say Combo or List Box Row Sources, or the Form Record Source ... where SQL was pasted directly into those properties.

mx
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 1000 total points
ID: 36995339
So, in other words, they may not be 'junk' ... especially if you have done a Compact & Repair.

These are from my EE db ...

mx
Capture1.gif
0
 
LVL 26

Assisted Solution

by:Nick67
Nick67 earned 1000 total points
ID: 36995482
If you turn on hidden objects in Tools|Options, you be able to view the MSysObjects table, that @mx put in a screenshot of.
The names have a structure

~sq_cfrmClients~sq_ccboToBeKilled

Refers to my form frmClients and to a control cboToBeKilled

Your

~sq_cF_COI_INS_CO_MAINT~sq_ccbo_choices
refers to the rowsource for  cbo_choices on your form c_COI_INS_CO_MAINT

Check the form and control.  You'll see raw SQL in the rowsource.
Save it out as a query, and you'll find that the entry is removed on compact and repair
Whatever you do, don't muck with anything in the system tables!
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 75
ID: 36995503
"Whatever you do, don't muck with anything in the system tables!"
Not to worry ... because you can't make any changes to MSys tables ...

mx
0
 

Author Comment

by:snyperj
ID: 37002995
I guess what I don't understand is that I haven't had the form: F_COI_INS_CO_MAINT in this database for a long long time, yet the sql for a combo box that was on that form is still showing up in query defs.   In fact, I had over 100 items in the MSysObjects table that no longer exist in this database (which use to be a much larger app.)

So I tried creating a new database and importing all of the existing objects (except the sys tables..)

That seems to have cleared it all up.

0
 
LVL 75
ID: 37003018
odd ... C&R should ... clean that out ...

mx
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question