Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2011

    Unanswered: Problem adding new record in tab control

    I have a medical database setup with a form including a tab control with two tabs…patients and medications/conditions. The patients tab holds a single form. The medications/conditions tab holds two individual continuous subforms by query for medications and conditions. This is working perfectly for old records, I can switch between tabs and the PatientID follows and shows the related meds and conditions.
    The problem is, I cannot add a new record. I get the following dialog when I enter the first character in any field on the patients form.

    If I hit OK, It will assign a new PatientID and allow me to continue entering data and even saves the data, but the PatientID does not follow to the medications/conditions tab(I have test PatientID controls in the forms). I can enter data in the medication/condition forms but it does not save that data because no PatientID is related to those records. I think I’m missing something simple but I am relatively new to Access. Any suggestions would be appreciated.

    Attached Thumbnails Attached Thumbnails Capture Assign.jpg  

  2. #2
    Join Date
    Jan 2009
    Kerala, India
    If Medications/conditions are related tables of Patients then you must establish Links with the Patients Form. Set the Link Master Field & Link Child Field properties of the Sub-Form with PatientsID.

    Link Master Field: mainformPatientsID

    Link Child Field: subformPatientsID (Learn MS-Access Tips & Tricks)
    Learn Advanced MS-Access Programming with sample VBA Code.

    All responses are based on Access 2003/2007

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts