I am trying to use subform to link two tables and enter data. In the first table, “tpat”, the primary key is subject_id, for which I use 5-digit autonumber (10001, 10002, …10010, 10011,…). The second table called “tcontact_tracking” has the primary key “track_id”. I tried to generate the number for “track_id” based on “subject_id”, so that for each subject, there can be a sequence of track_id; for example, for subject 10001, there are track #1000101, #1000102,…1000110, 1000111,…
Also, in the form (fpat_tracking), I want the subform (fcontract_tracking) to be grouped by subject_id, and in this way if I want to look at the track records of each subject, the main form shows the subject information and the subform shows the corresponding tracking information.
Coding is always a hardest part to me. Although I’ve got some suggestion earlier, my coding didn’t work out. I attach the database I have so far here. I was wondering whether some of you can help me out.
Appreciate any help.