I have 2 basic tables: clientTbl and MatterTbl. They are joined by the client no. and matter no. fields in both in the tables. The matterTbl contains jobs related to particular clients. A client might have two matters or a hundred.
ClientTbl fields: cCno, cMno (both numeric), client (char). MatterTbl: mCno, mMno, matterName (char).
My primary form has the client table and the sub form contains the matter table.
I want to have command buttons that will say: add Client, add Matter, delete Client, delete matter. Adding a new client will just create a blank client record but adding a matterTbl record must insert the client no (cCno) displayed in the primary form and the matter no (mMno) can be blank (usually last matter number for the client plus one). I also want to specify which tables the records are added to. Here is my add client code:
Private Sub ComSaveClient_Click()
' add matter from client form
On Error GoTo Err_ComSaveClient_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Thank you for any help you can offer.