SQL Disappearing From Query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Breezwell
    New Member
    • Sep 2008
    • 33

    #1

    SQL Disappearing From Query

    This is really odd.

    I have the following simple query, MetricsExcellen tSellers, which is run against a table called [Selling Flavors]:

    SELECT [Selling Flavors].GroupCode, [Selling Flavors].Customer, [Selling Flavors].TotalSales, [Selling Flavors].SalesClass
    FROM [Selling Flavors]
    WHERE ((([Selling Flavors].SalesClass)="E xcellent Seller"));


    When a button is clicked, this query is run and the results are diplayed in a subform with the following Source Object: Query.MetricsEx cellentSellers

    The query works just fine for a short while. The problem is that if I shut down the entire application, whenever I reopen the application, clicking the button tries to run the query but there is no SQL in the query anymore. It just disappears at random times. The query is not updated via a form. Its just a hard coded query that never changes.

    I have no idea what could cause this. I am using WinXP SP2 for whatever that is worth with Access 2002.

    Thanks for any insight.
  • puppydogbuddy
    Recognized Expert Top Contributor
    • May 2007
    • 1923

    #2
    your use of a period in object names such as Query.MetricsEx cellentSellers might be the cause. Periods are reserved for use to delineate objects. In addition, your use of spaces in object names (although permissable) does not following standard naming conventions (sse the link below):

    Comment

    • Breezwell
      New Member
      • Sep 2008
      • 33

      #3
      Thanks for the reply.

      I will give the object naming suggestion a try (I probably should redo all my objects names anyway for this reason) and post an answer once complete if the changes actually help.

      Comment

      • Breezwell
        New Member
        • Sep 2008
        • 33

        #4
        Well, I cleaned up the column names (removed white space in the names) in the table that the data is being pulled from for this particular query. The SQL appears to be 'stable' in terms of vanishing at various times.

        Thanks for the tips puppydogbuddy.

        Comment

        Working...