Solved Subform incorrectly filters to one record (1 Viewer)

Kayleigh

Member
Local time
Today, 10:21
Joined
Sep 24, 2020
Messages
706
I have come across this problem on several occasions and having trouble resolving.

I have a parent form concerning student/staff. The sub-form is their medical details which pops out when selected. However no matter which record I choose, the same information is automatically filled in when the subform opens.

I have checked if there is no filters and could not see anything. Do I need to add any code for this?

I have tried showing as a sample but since there is so much sensitive data involved, it may not be so helpful to see sample attached. (I can attach screenshot if better...)

Regards,
Krayna
 

Attachments

  • StudentsMed_NoData.accdb
    1.5 MB · Views: 192

Isaac

Lifelong Learner
Local time
Today, 02:21
Joined
Mar 14, 2017
Messages
8,774
When it does that, which record is the parent form on?
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:21
Joined
May 21, 2018
Messages
8,525
if you have not established child master linking it will default to the first record. What is your child master links?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:21
Joined
May 7, 2009
Messages
19,232
see if this helps.
 

Attachments

  • StudentsMed_NoData.accdb
    604 KB · Views: 196

Kayleigh

Member
Local time
Today, 10:21
Joined
Sep 24, 2020
Messages
706
Thanks. However when I copied the code for cmdHealth into my DB, it ran into an error when button clicked and debugging would flag up this line: Forms!sbfrmStudentHealthInfo.fldStudentID_AfterUpdate
So the same problem occurs.

By the way it is not a real subform so can't link parent and child fields - its a pop-out form.

Any ideas how to resolve?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:21
Joined
May 7, 2009
Messages
19,232
Thanks. However when I copied the code for cmdHealth into my DB, it ran into an error when button clicked and debugging would flag up this line: Forms!sbfrmStudentHealthInfo.fldStudentID_AfterUpdate
change the Event as Public (not Private).
 

Users who are viewing this thread

Top Bottom