coasterman
Registered User.
- Local time
- Today, 00:11
- Joined
- Oct 1, 2012
- Messages
- 59
I have a function of Allen Brownes http://allenbrowne.com/func-concat.html that creates a concatenated string from user entry in a sub sub form, that string describes (by means of the various tags) the key content of the main record and its sub forms. The concatenated string needs to be saved in the parent forms table to perform some search duties against the parent form.
Just by way of background the data being fed into the database is extremely diverse and with no easily defined structure, one record may be a simple contact record, another may be legal precedent another may be an internal business rule, there are countless other class of records but the key thing is all records need to be searchable in a single pass. After a number of false starts I had the idea of users adding keywords within the records subforms.. This way the final search can identify any potential records of interest regardless of the class of the record itself.
The form and field names below are fictional but may give a more understandable context
The tags are entered by a popup form which is linked to the sfrmAddressIssues which is two layers below the parent form.
Parent form =frmContacts
subform1 = sfrmAddresses
subform2 = sfrmAddressIssues
A command button on subform2 launches a final popup continuous form 'sfrmTags' (the FK is inherited from the sfrmAddressIssuesID) The function concatenate is working great and I have a memo field on the parent form whose control source is the function showing the tags all nicely together
As stated at the beginning I am now trying to find out how to plug the concatenated tags string from the function directly into the parent forms table (tblContacts) whenever the concatenate function is triggered.
The parent table PK is ContactID and the field which I am trying to populate with the tags is globalTags
I'm still learning about record sets but I suspect it's probably something I need for this task I just don't know how currently.
I should mention the popup form foreign key is the PK from Subform2 so again I guess I need to uncover the ContactID so that the code knows which row of the parent table to plug into, thinking aloud I guess I could set a tempvar to reference the ContactID on the parent form
Anyway there's my conundrum and as ever any help here would be greatly appreciated.
Just by way of background the data being fed into the database is extremely diverse and with no easily defined structure, one record may be a simple contact record, another may be legal precedent another may be an internal business rule, there are countless other class of records but the key thing is all records need to be searchable in a single pass. After a number of false starts I had the idea of users adding keywords within the records subforms.. This way the final search can identify any potential records of interest regardless of the class of the record itself.
The form and field names below are fictional but may give a more understandable context
The tags are entered by a popup form which is linked to the sfrmAddressIssues which is two layers below the parent form.
Parent form =frmContacts
subform1 = sfrmAddresses
subform2 = sfrmAddressIssues
A command button on subform2 launches a final popup continuous form 'sfrmTags' (the FK is inherited from the sfrmAddressIssuesID) The function concatenate is working great and I have a memo field on the parent form whose control source is the function showing the tags all nicely together
As stated at the beginning I am now trying to find out how to plug the concatenated tags string from the function directly into the parent forms table (tblContacts) whenever the concatenate function is triggered.
The parent table PK is ContactID and the field which I am trying to populate with the tags is globalTags
I'm still learning about record sets but I suspect it's probably something I need for this task I just don't know how currently.
I should mention the popup form foreign key is the PK from Subform2 so again I guess I need to uncover the ContactID so that the code knows which row of the parent table to plug into, thinking aloud I guess I could set a tempvar to reference the ContactID on the parent form
Anyway there's my conundrum and as ever any help here would be greatly appreciated.
Last edited: