I have a neurosurgery database that has a main form containing demographic data with a surgery data subform embedded into to it. The two forms are linked by the patient ID number. The form has worked fine for years. Suddenly, the subform no longer picks up the patient ID number from the main form. I haven't changed anything. I'm getting this error message:
So far I have:3101 Microsoft Office Access database engine cannot find a record in the tblDemographics with key matching field(s) "IdNum"
- run the compact and repair database thing.
- checked the table relationships and even redid them several times.
- cut the subform out and re-embedded it being careful to make sure they were linked by the ID number.
- opened a backup copy of the database, checked to make sure the form was working properly. Then blew away all the tables in the backup copy and imported all the tables from the current copy. As soon as I did that, the form stopped working again.
- Tried creating a new main form and embedded the existing surgery data form into it. Same problem.
- Tried creating a new main form and a new embedded surgery data form. Same problem.
- checked all the VBA I can find in both forms. Nothing seems amiss.
So can anyone tell me why this is happening and how to fix it?
Thanks.