Hi all,
I'm trying to get a subform to display results from its table, but based on criteria from the parent form which is bound to another table.
The main form "frmJobs" shows information about different jobs in a quality inspection department which is stored in table "tblJobs". There are many subforms on frmJobs, which are all linked to the main form by the job number (which is the primary key in tblJobs) and record various information about the job in other tables (defects, locations, inspector names and times etc.). This all works really well. However I now want to add a subform (sbfrmPart_Competency) which shows who is competent to inspect the job. This information will rely on the part number given in the parent form frmJobs, and will look the part number up in tblPart_Competency and return information about all staff that have that part number.
I've used a bit of trickery to get this working as best i can, like using =[Parent]![txtPart_Number] in the subform, and DLookups in the VBA behind sbfrmPart_Competency, but I seem to be getting strange results like multiple identical records being shown for just one entry in tblPart_Competency.
I'm somewhat a beginner and have worked hard to get this far mostly by myself, but I'm getting frustrated that this seemingly simple task has been eluding me for a couple of days now! I wonder if an expert can offer any advice?
Sharepoint link to the file is available here: https://leveldevelopments-my.sharepo...h2MxQ?e=A5YeEy