Results 1 to 3 of 3
  1. #1
    yrstruly is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2024
    Posts
    122

    Join makes Query/form Un-updateable

    I have this query,QfrmPlantsPrices that works, but i cant update the form. The data entry/new blank record, becomes not an option(star) disabled.

    Code:
    SELECT    DISTINCTROW TblPlantsPrices.PlantID,
        TblPlantsPrices.SoldAs,
        Plants.Cultivar,
        Plants.Clone,
        Plants.Ipno,
        Plants.PlantType,
        Plants.VarietyList,
        Plants.PhytoCert,
        TblPlantsPrices.Winter,
        TblPlantsPrices.Summer,
        TblPlantsPrices.Autumn,
        TblPlantsPrices.Grape,
        TblPlantsPrices.NoSeason,
        TblPlantsPrices.Price,
        TblPlantsPrices.[Royalty/Levy],
        TblPlantsPrices.CurrencyType AS OriginalCurrencyType,
        TblPlantsPrices.[Royalty/Levy_LastYear],
        TblPlantsPrices.SummerAll,
        TblPlantsPrices.AutumnAll,
        TblPlantsPrices.WinterAll,
        TblPlantsPrices.GrapeAll,
        TblPlantsPrices.Scion,
        TblPlantsPrices.Root,
        TblPlantsPrices.KWVAll,
        TblPlantsPrices.Vat,
        TblPlantsPrices.[Other Royalties],
        TblPlantsPrices.Other_Royalties_LastYear,
        TblPlantsPrices.Royalty AS Royalty_Original,
        TblPlantsPrices.Levy,
        TblLicence.PlantBreederRights,
        IIf(
            [PlantBreederRights] = Yes,
            "Royalty",
            IIf([PlantBreederRights] = No, "Levy", "")
        ) AS RorL,
        TblPlantsPrices.ExchangeRateMonth,
        TblPlantsPrices.RLCollectedBy,
        Nz (qryRoyaltyCurrencySplit.Royalty, 0) AS Royalty,
        Nz (qryRoyaltyCurrencySplit.CurrencyType, "") AS CurrencyType,
        Nz (qryRoyaltyCurrencySplit.IPOwnerShare, 0) AS IPOwnerShare,
        Nz (qryRoyaltyCurrencySplit.SAPOShare, 0) AS SAPOShare
    FROM
        (
            (
                Plants
                INNER JOIN TblPlantsPrices ON Plants.PlantID = TblPlantsPrices.PlantID
            )
            LEFT JOIN TblLicence ON Plants.PlantID = TblLicence.PlantID
        )
    
    LEFTJOIN qryRoyaltyCurrencySplit ON Plants.PlantID = qryRoyaltyCurrencySplit.PlantID;
    It reads from another Query, qryRoyaltyCurrencySplit:
    Sample Data.


    Code:
    PlantID    Royalty    CurrencyType    IPOwnerShare    SAPOShare
    AL0001    8,88    R    7,1    1,78
    Sample Data.
    Code:
    PlantID    SoldAs    Cultivar    Clone    Ipno    PlantType    VarietyList    PhytoCert    Winter    Summer    Autumn    Grape    NoSeason    Price    Royalty/Levy    SummerAll    AutumnAll    WinterAll    GrapeAll    Scion    Root    KWVAll    Vat    Other Royalties    PlantBreederRights    Levy    OriginalCurrencyType    Royalty/Levy_LastYear    Other_Royalties_LastYear    Royalty_Original    RorL    ExchangeRateMonth    RLCollectedBy    Royalty    CurrencyType    IPOwnerShare    SAPOShare
    AL0001    Ogie    Butte    BT 5109    I5109    Amandel    Yes    No    No    Yes    No    No    Yes    0,00    8,88    33    0    0    0    Yes    No    0    No        0    Yes    R    8,30        No    Levy        SAPO    8,88    R    7,1    1,78
    Original Code:

    Code:
    SELECT    DISTINCTROW TblPlantsPrices.PlantID,
        TblPlantsPrices.SoldAs,
        Plants.Cultivar,
        Plants.Clone,
        Plants.Ipno,
        Plants.PlantType,
        Plants.VarietyList,
        Plants.PhytoCert,
        TblPlantsPrices.Winter,
        TblPlantsPrices.Summer,
        TblPlantsPrices.Autumn,
        TblPlantsPrices.Grape,
        TblPlantsPrices.NoSeason,
        TblPlantsPrices.Price,
        TblPlantsPrices.[Royalty/Levy],
        TblPlantsPrices.CurrencyType,
        TblPlantsPrices.[Royalty/Levy_LastYear],
        TblPlantsPrices.SummerAll,
        TblPlantsPrices.AutumnAll,
        TblPlantsPrices.WinterAll,
        TblPlantsPrices.GrapeAll,
        TblPlantsPrices.Scion,
        TblPlantsPrices.Root,
        TblPlantsPrices.KWVAll,
        TblPlantsPrices.Vat,
        TblPlantsPrices.[Other Royalties],
        TblPlantsPrices.Other_Royalties_LastYear,
        TblPlantsPrices.Royalty,
        TblPlantsPrices.Levy,
        TblLicence.PlantBreederRights,
        IIf(
            [PlantBreederRights] = Yes,
            "Royalty",
            IIf([PlantBreederRights] = No, "Levi", "")
        ) AS RorL,
        TblPlantsPrices.ExchangeRateMonth,
        TblPlantsPrices.RLCollectedBy
    FROM
        (
            Plants
            INNER JOIN TblPlantsPrices ON Plants.PlantID = TblPlantsPrices.PlantID
        )
    
    LEFTJOIN TblLicence ON Plants.PlantID = TblLicence.PlantID;

  2. #2
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,421
    There are several reasons why queries may not be updatable. I'd say that you're using one of them at least (DISTINCT predicate). I didn't look for other reasons. Take at look here; I don't worry if my browser warns that the site is not secure as I've trusted it for many years.
    http://allenbrowne.com/ser-61.html

    EDIT - I took a closer look at the rest of that and would venture to say that your db is not normalized. At least not your prices table. You might want to research normalization to see if you've designed your tables correctly.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Don't use CODE tags to post data. Build a table with the Advanced post editor. Can even copy/paste records from Access or Excel then edit the table.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 05-09-2017, 10:41 AM
  2. Replies: 2
    Last Post: 11-22-2015, 07:24 PM
  3. Alt-Tab makes popup form lose focus
    By keviny04 in forum Forms
    Replies: 4
    Last Post: 04-21-2015, 10:38 AM
  4. A form that makes multiple entries
    By dimits in forum Forms
    Replies: 3
    Last Post: 06-09-2014, 12:53 PM
  5. What makes form 'design save' before open?
    By bhammer in forum Forms
    Replies: 2
    Last Post: 04-23-2012, 03:08 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums