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;