HillTJ
To train a dog, first know more than the dog..
- Local time
- Yesterday, 22:05
- Joined
- Apr 1, 2019
- Messages
- 731
Friends, I’ve started a new project which is to be a CRM system along the lines of that published by CRM Design Tutorial. I like the flexibility that this design provides. I have built the database tables and relationships. A design consideration is the 1:1 relationship of PartyID to both tblOrganisation & tblPerson to tblParty. That is, a unique PartyID is applied as the PK in both said tables. This is new to me & I'm having a bit of trouble!.
So, I’ve made a form ‘frmMain’ onto which I have two buttons, to add new Organisations or People respectively. My intention is when either button is depressed, then a record is created in tblParty & that partyID is passed to the form as an openarg. The default value of the PK is then set as the value of the openarg upon close of either form.
Upon closing the form (either frmEstablishment or frmPerson) the new record is saved and the PK is reflected on both tblParty and the form respectively. Happy Days!. When I close either form, my intent is to determine whether the record has any entries or whether it is merely closed without adding data. In the latter case, then I need to delete the related entry in tblParty.
Currently, frmEstablishment is not being populated & I don’t know why.
This may be a tall ask, but I’d appreciate assistance in reviewing my logic & checking whether my code makes sense. If you have any recommendations, then I’d really like to hear them.
So, I’ve made a form ‘frmMain’ onto which I have two buttons, to add new Organisations or People respectively. My intention is when either button is depressed, then a record is created in tblParty & that partyID is passed to the form as an openarg. The default value of the PK is then set as the value of the openarg upon close of either form.
Upon closing the form (either frmEstablishment or frmPerson) the new record is saved and the PK is reflected on both tblParty and the form respectively. Happy Days!. When I close either form, my intent is to determine whether the record has any entries or whether it is merely closed without adding data. In the latter case, then I need to delete the related entry in tblParty.
Currently, frmEstablishment is not being populated & I don’t know why.
This may be a tall ask, but I’d appreciate assistance in reviewing my logic & checking whether my code makes sense. If you have any recommendations, then I’d really like to hear them.