I'm going to detail the structure I have, the question is after (highlighted)
I have a main form (well, almost, it's inside the navigation subform....): fSoftwareItem. This is unbound and houses 3 subforms that are linked to each other, in 1:M relationship as ordered below.
These forms are linked as per instructions here:
Microsoft Access FormsSynchronize Two Related Subforms on a Microsoft Access Form
HOWEVER.... it has occured to me, after I'd done the Developer search, and was thinking about the Title search, that in some cases users will NOT always know the Developer of a software Title (bourne out by my perusal of the import data today. Some are going to be entered with UNKNOWN as the Developer. Especially with some of the smaller VERY specific software where it's not always clear who made it... and even if they do have a Developer, people don't remember those Developer names much anyway - the Title is the main thing people go by (but we still need Developer info for other purposes).
Ok, what has me scratching my head:
I wanted to put a textbox to use as a Title search and have fTitleSubform display all matching records (similar to Developer search above). When the user then selects a record from that filtered list, obviously the linked child subform (fVersionSubform) will update with matching records, but how to get the PARENT fDeveloperSubform to reload with the parent record? And not error when the search results appear.
Would it be easier with a combobox, where you can only select ONE title? Although that's going to be one long cbobox list... and they don't always know the exact name and some are similar, so a return of like results is better. Is the Title search/filter txt/cbo better placed in the unbound mainform, fSoftwareItem?
Is this even possible?
Or do I have a modal search form that displays a list of search results (i.e. using a query that includes tDeveloper and tTitle) and then when a user selects one it closes the form and reloads the 3 subforms in response to the selection. Seems a bit cumbersome, I'd like to avoid that if possible.
It's working well for data entry. The relationships between the tables are correct.... I'm just baffled how to do this one small thing
I have a main form (well, almost, it's inside the navigation subform....): fSoftwareItem. This is unbound and houses 3 subforms that are linked to each other, in 1:M relationship as ordered below.
These forms are linked as per instructions here:
Microsoft Access FormsSynchronize Two Related Subforms on a Microsoft Access Form
- fDevelopersSubform
- Table: tDeveloper
- Fields:
- IDDeveloper
- DeveloperName
- fTitleSubform
- Table: tTitle
- Fields:
- IDTitle
- FIDDeveloper
- FIDSuite (cbo lookup on form to tSuite (IDSuite, FIDDeveloper, SuiteName) where FIDDeveloepr fields match because Suite is optional)
- Title
- SoftwareFunction
- FIDType (cbo lookup to tType)
- fVersionSubform
- Table: tVersion
- Fields:
- IDVersion
- FIDTitle
- Version
- FIDAvailability (cbo lookup to tAvailability (i.e. Live, Proposed, Archived, etc))
- FIDLicenseType (cbo lookup to fLicenseType (i.e. Standard, Concurrent, Site, Free)
- LicenseCount
- LicenseCurrent (Y/N)
- LicenseDeactivationReq(Y/N)
- DETAILS link to open a MODAL form (fVersionDetailSubform) that houses the full tVersion fields. The above are the key info fields, but users can store more as required, via this detail form.
- FIDPreviousVersion (cbo lookup to iself to indicate the version that preceeded it. Filtered via a form_load() event to only show the entries where the Title match AND is not the current record.
- (plus a few more...)
- There is also an embedded Subform within that Modal form, fVersionDetailSubform, called fSoftwareAssociationSubform. This is where users can specify which software items(versions) has a relationship (i.e a plugin item will have a relation to a full software item). It is a self-join (tVersion 1:M tAssociations M: tVersion).
Code:
Private Sub cmdFilter_Click()
Dim strFilterStart As String
Dim strFilterEnd As String
Dim strFilterDeveloper As String
strFilterStart = "SELECT * FROM [tDeveloper] WHERE "
strFilterEnd = " ORDER BY [tDeveloper].[DeveloperName];"
strFilterDeveloper = "[tDeveloper].[DeveloperName] Like ""*"" & Nz(Forms![fNavigation].[NavigationSubform].Form![fDeveloperSubform].form.[txtFilterDeveloperName]) & ""*"""
Me.RecordSource = strFilterStart & strFilterDeveloper & strFilterEnd
End Sub
Ok, what has me scratching my head:
I wanted to put a textbox to use as a Title search and have fTitleSubform display all matching records (similar to Developer search above). When the user then selects a record from that filtered list, obviously the linked child subform (fVersionSubform) will update with matching records, but how to get the PARENT fDeveloperSubform to reload with the parent record? And not error when the search results appear.
Would it be easier with a combobox, where you can only select ONE title? Although that's going to be one long cbobox list... and they don't always know the exact name and some are similar, so a return of like results is better. Is the Title search/filter txt/cbo better placed in the unbound mainform, fSoftwareItem?
Is this even possible?
Or do I have a modal search form that displays a list of search results (i.e. using a query that includes tDeveloper and tTitle) and then when a user selects one it closes the form and reloads the 3 subforms in response to the selection. Seems a bit cumbersome, I'd like to avoid that if possible.
It's working well for data entry. The relationships between the tables are correct.... I'm just baffled how to do this one small thing