Updating a field in a subform after updating a field in Main Form

suzemt

Registered User.
Local time
Today, 02:50
Joined
Oct 12, 2012
Messages
15
I recently posted a question which was answered wonderfully. I wanted to update FieldA and then have FieldB autofill with a specific phrase. This was the result:

Private Sub FieldA_AfterUpdate()
Select Case Me.
FieldA
Case Is = "Astro"
Me.
FieldB = "06"
Case Is = "EPP"
Me.
FieldB = "17"
Case Is = "CFSA"
Me.
FieldB = "14"
End Select

However I now want to do exactly the same but FieldB will be on a subform. I am just unsure where I need to put the name of the subform to make this happen.
:banghead:

Any ideas?
 
This is the most common syntax to write a string to a control or field on a subform:
Code:
Me.subformcontrolname.Form.fieldname = "whatever"

This also works:
Code:
Me.subformcontrolname!fieldname = "whatever"
 
Thanks Galaxiom - that worked perfectly. It Does Exactly What It Says On The Tin!!!:)
 
Yes! THis way worked well for the first record in the subform. Now I encountered this problem, I got siubform with records more than one. In this case, how can I update the rest records?? Thanks a lot!!
 

Users who are viewing this thread

Back
Top Bottom