• Query Issue (Access2003)

    Author
    Topic
    #429927

    I have two queries. When I run each of them, the correct data is returned, however the data returned by query1 is in edit mode, and the data returned by query2 is in read only mode. I need both of the results to return data in edit mode. What do I need to do to query2 to fix the issue. Any help is appreciated.
    Thanks,

    Viewing 1 reply thread
    Author
    Replies
    • #1002500

      There are several possible causes for a query not being editable:
      – It is a Totals query
      – It is a Crosstab query (a special kind of Totals query)
      – The Unique Values property of the query has been set to Yes.
      – It is based on more than one table, and the tables are not linked, or they are linked but there is no unique key on the link field(s) on one side.
      – The Recordset Type property of the query has been set to Snapshot.
      Since you haven’t provided any information whatsoever about the queries, I cannot give more specific help.

      • #1002513

        Both queries are select queries. Here is the sql for the query that I am having the issues with. I think there may be a problem with the join operation, cause if i take the tblJobNumbersLoc portion out of the code, it works fine.

        SELECT tblEntry.[Emp#], tblEntry.[Job Number], tblEntry.[Activity Code], tblEntry.[Week#], tblEntry.Year, tblJobNumbersLoc.[Billing Code], tblJobNumbersLoc.Description, [Billing Code] & [Description] AS combine, Left([Billing Code],7) AS [Part of Billing Code], tblJobNumbersLoc.[Customer Name]
        FROM tblEntry INNER JOIN tblJobNumbersLoc ON tblEntry.[Job Number]=tblJobNumbersLoc.[Job Number]
        ORDER BY tblEntry.[Job Number];

        • #1002516

          Is there a unique index (for example the primary key of the table) on the Job Number field in one of the tables?

          • #1002518

            Thanks HansV, the primary key on the second table was not set. Once again you solved the problem!

    • #1002505

      How is the query launched? If it’s from an Event – such as after a button click, check the DoCmd for the query.

      DoCmd.OpenQuery “qryName”, acViewNormal, acReadOnly <should be acEdit to be in edit mode.

    Viewing 1 reply thread
    Reply To: Query Issue (Access2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: