I am in the process of developing my first database. This db is only for my personal use.
I will try to explain my problem as best as possible. Since explanation only is propably not going to be enough, I am attaching my database with dummy data.
Here's how the database works:
Welcome screen opens first. From here I can choose a new patient on an existing patient by double clicking on ID field. I either of these situations the frmPatient form opens. From here you can choose a new visit or an existing visit. New visit opens frmVisit with the relevant patient ID and date already populated. On this form I enter data for the visit. I also have a subform called PastHx which records data with regard to the patient and not the visit (so this data is linked to the patient ID rather than the visit ID). This data is the same for each visit for a particulat patient. I know that placing this subform in frmPatient is more logical but that is not a good flow for me and I need this form to be on that particular tab position on frmVisit since it is compatible with my work flow.
My problem is that the subform (frmPastHx) does not display the correct record (it displays data from the first record in that table). When I try to type sometimg in I get an error indicating that this would create duplicates. Once this visit has been closed up and accessed through the combobox on frmPatient, the subform displays correct data.
Please be kind enough to go through my database and suggest a solution.
Thanks
I will try to explain my problem as best as possible. Since explanation only is propably not going to be enough, I am attaching my database with dummy data.
Here's how the database works:
Welcome screen opens first. From here I can choose a new patient on an existing patient by double clicking on ID field. I either of these situations the frmPatient form opens. From here you can choose a new visit or an existing visit. New visit opens frmVisit with the relevant patient ID and date already populated. On this form I enter data for the visit. I also have a subform called PastHx which records data with regard to the patient and not the visit (so this data is linked to the patient ID rather than the visit ID). This data is the same for each visit for a particulat patient. I know that placing this subform in frmPatient is more logical but that is not a good flow for me and I need this form to be on that particular tab position on frmVisit since it is compatible with my work flow.
My problem is that the subform (frmPastHx) does not display the correct record (it displays data from the first record in that table). When I try to type sometimg in I get an error indicating that this would create duplicates. Once this visit has been closed up and accessed through the combobox on frmPatient, the subform displays correct data.
Please be kind enough to go through my database and suggest a solution.
Thanks