I'm working with a main form (FrmLicence) that displays licensing information from multiple joined tables (e.g., TblLicence, Plants, Profile). I created a subform (FrmLicenceTblPBRVLInfo) to capture additional PBR/VL info related to each license, using a LicenceID field as the link.
The subform is embedded in the main form using Link Master Fields = Id and Link Child Fields = LicenceID. However, I keep getting an “Enter Parameter Value” prompt and sometimes a run-time error related to ActiveX/OLE or missing fields.
Both fields exist, and the forms open fine separately. I'm trying to make sure the subform is editable and correctly linked so it only shows or allows input for the related license. What am I missing?
Main Forms Query
Code:
SELECT DISTINCTROW TblLicence.Id, TblLicence.PlantID, Plants.Cultivar, TblLicence.Nr, Profile.Display, TblLicence.ConType, TblLicence.LicHolder, TblLicence.ConExpireDate, TblLicence.Renewable, TblLicence.Breeder, TblLicence.Upfront, TblLicence.Royalty, TblLicence.MonthPay, TblLicence.Importer, TblLicence.Comment, TblLicence.NextPeriod, TblLicence.PlantBreederRights, TblLicence.PbrExpireDate, TblLicence.Origin, TblLicence.FirstCom, TblLicence.PbrGrantNo, TblLicence.Trademark, TblLicence.FirstComPlace, TblLicence.Supplier, TblLicence.ConSignDate, TblLicence.RenewableDate, TblLicence.PBROwner, TblPlantsPrices.Royalty, TblPlantsPrices.Levy
FROM ((TblLicence INNER JOIN Profile ON TblLicence.Nr = Profile.Nr) INNER JOIN Plants ON TblLicence.PlantID = Plants.PlantID) LEFT JOIN TblPlantsPrices ON TblLicence.PlantID = TblPlantsPrices.PlantID;
Code:
CREATE TABLE TblLicence (
Id AUTOINCREMENT PRIMARY KEY,
PlantID TEXT,
Nr TEXT,
s_GUID AUTOINCREMENT,
ConType NUMBER,
LicHolder YESNO,
ConExpireDate DATETIME,
ConSignDate DATETIME,
Renewable YESNO,
Breeder TEXT,
Upfront TEXT
);
,
Code:
CREATE TABLE TblPBRVLInfo_Clean (
PBRVLID AUTOINCREMENT PRIMARY KEY,
LicenceID NUMBER,
VL_ApplicationNo TEXT,
VL_ApplicationDate DATETIME,
VL_GrantApprovalNo TEXT,
VL_GrantApprovalDate DATETIME,
PBR_ApplicationNo TEXT,
PBR_ApplicationDate DATETIME,
PBR_GrantNo TEXT,
PBR_GrantApprovalDate DATETIME,
PBR_GrantExpiryDate DATETIME,
PBR_EndOfSoleRight DATETIME,
PBR_AnnualRenewalDuty_SAF CURRENCY
);