2 part subform problem

J

JD

I have a form that when a selection from a combo box of a
part name is made it update a table called AddedMaterial
with Partname, cost, and customerID. On the main form
there is a subform which should display the added part.
Herein lay problem one.

When a selection is made the after update has coding to
automatically update the AddedMaterial table. However
nothing displays on the subform that shows the new
addition or update. Checking the Addedmaterial table
shows that indeed the information is there. How can I get
that informatio to display on the subform without having
to close the parent form and reopen?

Secondly there is an unbound field on the main form that
needs a running total of all parts listed in the
addedmaterial table. How can I set this up to perform the
calculation?

Thanks in advance
 
J

JohnWL

JD said:
I have a form that when a selection from a combo box of a
part name is made it update a table called AddedMaterial
with Partname, cost, and customerID. On the main form
there is a subform which should display the added part.
Herein lay problem one.

When a selection is made the after update has coding to
automatically update the AddedMaterial table. However
nothing displays on the subform that shows the new
addition or update. Checking the Addedmaterial table
shows that indeed the information is there. How can I get
that informatio to display on the subform without having
to close the parent form and reopen?

Secondly there is an unbound field on the main form that
needs a running total of all parts listed in the
addedmaterial table. How can I set this up to perform the
calculation?

Thanks in advance

The first question probably just needs a Requery statement to force the
sub-form to re-query its datasource and thus refresh the data in the
sub-form. I don't have the exact syntax handy, but I would add a
sub-formname.Requery statement in the AfterUpdate coding when the selection
is made. Try just a simple Requery without any specs, such as:

Private Sub yourcontrol_AfterUpdate()
code to update MaterialAdded table
Requery
End Sub

John Loewen
 

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