Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Jun 2004
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query Issue (Access2003)

    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,

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query Issue (Access2003)

    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.

  3. #3
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query Issue (Access2003)

    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.

  4. #4
    2 Star Lounger
    Join Date
    Jun 2004
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query Issue (Access2003)

    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];

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query Issue (Access2003)

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

  6. #6
    2 Star Lounger
    Join Date
    Jun 2004
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query Issue (Access2003)

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •