Update a sub form in a form!!

G

Guest

I got a form and a subform

form = fruit , (field = Name)(combo Box)
subform = mass , (field = Weight)

Question : How can i run the (Weight_afterupdate) using (Name_afterupdate)
in VBA?

Let say the form and subform do not have the same source(subform inside the
form)

In short, what code to be used in the (Name_afterUpdate( )) to run
(Weight_afterupdate( )(subform))?

Any solutions?

Thanks in advance

Kennykee
 
G

Guest

You can always create a function in a module write in it what ever you want
to happen on the after update of the weight , so you can call from both the
form and the subform.
 
G

Guest

Ermmm.. I am quite not understand what was the meaning of your instructions
Can you please just write a vba code for me for better understanding?
 
G

Guest

I'll try to walk you throug
Let say I Have a main form called Form2, and a subform Called Form1.
In the sub form I have a field called mass and after I update that field I
Run a refresh on another field Called MyField
I'll create a function in a module
function aaa()
Forms![Form2]![Form1].Form![MyField].requery
end function

in the after update of the field mass I'll call that function

Private Sub mass_afterapdate()
aaa
end sub

I'll also call this function on the after update event of the field on the
main form.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top