Q:

MS Access - MSys Objects has orphaned query SQL for renamed form

In a Microsoft Access database I inherited, I had a form called frm_LabList. The record source was a Select statement. I renamed the form to frmLabour and everything continues to work well.
Today, I discovered that there is a record in MSysObjects that still holds the Select statement referring to the old form name. There is also a record that holds the Select statement that refers to the new form name. 
Two questions:

Will this orphaned query record in MSysObjects cause a problem?
Is there a way to clear out these orphaned records?

I've compacted and repaired but the orphaned record still remains.

A:

This is usual behavior. 
First question: No, I've noticed these a lot (the query names tend to start with ~sq_f, and refer to an old version of your form). I don't think the storage space it takes up is relevant. I tend to write code to not show these when making a list of all queries, but never had any further issues with them
Second question: Yes, with some simple VBA you can delete these. Just execute the following line through the immediate window:  CurrentDb.QueryDefs.Delete "~sq_ffrm_LabList". 
Note that when deleting the queries behind normal forms, they just get recreated as soon as the form opens.
The following code deletes all form queries, run at your own risk! (haven't noticed any issues myself after running it, as far as I know the SQL is stored in the Form.Recordsource property, but the query object still stores things such as layout when using the query builder on the Form.Recordsource property)
Public Sub DeleteFormQueries()
    Dim qdf As Object
    For Each qdf In CurrentDb.QueryDefs
        If qdf.Name Like "~sq_f*" Then
            CurrentDb.QueryDefs.Delete qdf.Name
        End If
    Next qdf
End Sub

