Subform with non direct foreign key relationship
Posted: Fri Dec 13, 2019 3:17 pm
Hi,
Is there a way I can add a subform that does not have a direct relationship with the table used for the parent form?
I have a form in which I want a subform just to add rows to a database. The logic is along the lines of: I have hardware assemblies, assemblies have multiple revisions and at a particular revision there are multiple serialNumbers for things made to that revision.
So I have assembly, assemblyRevision and serialNumber tables.
I want to choose an assembly from a browse form (table assembly) to open an edit form for that assembly. On that form I want a subform (table serialNumber) where I can just add serial numbers along with their revision. I can populate the reference to assemblyRevision in the subform with javascript.
My serialNumber table does not contain any reference to the assembly table, just the assemblyRevision table.
I've basically got all this together - but I can't get it to work because by subform 'requires' a foreign key and I can't seem to disable this or put something in there that will make the UPDATE query work.
Hope this makes sense.
Cheers,
Steve
Is there a way I can add a subform that does not have a direct relationship with the table used for the parent form?
I have a form in which I want a subform just to add rows to a database. The logic is along the lines of: I have hardware assemblies, assemblies have multiple revisions and at a particular revision there are multiple serialNumbers for things made to that revision.
So I have assembly, assemblyRevision and serialNumber tables.
I want to choose an assembly from a browse form (table assembly) to open an edit form for that assembly. On that form I want a subform (table serialNumber) where I can just add serial numbers along with their revision. I can populate the reference to assemblyRevision in the subform with javascript.
My serialNumber table does not contain any reference to the assembly table, just the assemblyRevision table.
I've basically got all this together - but I can't get it to work because by subform 'requires' a foreign key and I can't seem to disable this or put something in there that will make the UPDATE query work.
Hope this makes sense.
Cheers,
Steve