Update Field in subform

Tanya

Access Novice
Local time
Today, 14:15
Joined
Sep 7, 2008
Messages
165
I have a form with two subforms and need to update a field in one subform based on the selection on other subform. Is this possible?

The main form is frmBehaviour

SubfrmBehaviour has StudentID and when this field is selected subfrmBehaviourPoints updates, however the StudentID field does not :(
I have tried various versions of update event as follows

Forms!frmBehaviour!SubfrmBehaviour!StudentID=Forms!frmBehaviour!SubfrmBehaviourPoints!StudentID and this is not working. I think that is because I am using two subform datasheets?

Any suggestions would be appreciated.

Regards
Tanya
 

Attachments

I didn't understand what you said. However, one possible problem is that your query doesn't include (i.e. doesn't SELECT) the StudentID column. This probably explains why the righthand subform has zeroes in the StuduentID column.
 
I think you are correct and I cannot work out how to select the StudentID column.
 
I have a form with two subforms and need to update a field in one subform based on the selection on other subform. Is this possible?

The main form is frmBehaviour

SubfrmBehaviour has StudentID and when this field is selected subfrmBehaviourPoints updates, however the StudentID field does not :(
I have tried various versions of update event as follows

Forms!frmBehaviour!SubfrmBehaviour!StudentID=Forms!frmBehaviour!SubfrmBehaviourPoints!StudentID and this is not working. I think that is because I am using two subform datasheets?

Any suggestions would be appreciated.

Regards
Tanya

Hello Tanya,

Not sure what you are trying to do but if the example you gave is accurate then your syntax is wrong. You could give this a try and see if it makes a difference.

Try this:
Forms!frmBehaviour!SubfrmBehaviour.Form!StudentID=Forms!frmBehaviour!SubfrmBehaviourPoints.Form!StudentID

HTH,
Shane
 
Thank you Shane,
I switched your entry around to
Forms!frmBehaviour!SubfrmBehaviourPoints.Form!StudentID=Forms!frmBehaviour!SubfrmBehaviour.Form!StudentID
and it worked a treat.
You have saved me a great deal of time.
Thank you
Kind Regards
Tanya
 

Users who are viewing this thread

Back
Top Bottom