Refreshing subforms separately

G

Geo

In an Access 2002XP form, I hava a subform for introducing data in a table
(fields: name, dimensions, quality, quantity (kg), price) and a subform
displaying calculated data from a query based on the mentioned table
(fields: name, dimensions, quality, quantity (m)-calculated, price,
total_price -calculated).

In the first subform I have a a command button "SAVE" wich saves the record
and adds a new blank record.
In the second subform I have a command button called "REFRESH", wich
commands the subform to show all records and refresh, for displaying the
list of added records (and the calculated fields) after adding them.
The PROBLEM is that, when I am using this command button it refreshes not
only the second subform, but the first subform too, so, in the controls of
the first subform I don't see anymore the blank fields for a new record, but
the fields of the first record of the table.

How can I remediate this problem?

I need to prevent the refreshing of the first subform when using the
"REFRESH" button, or a code for a command button to use instead of the 2
command buttons, do the operations for the both of them.

Thank you in advance!
Geo
 
B

Bill Tibbetts

Try adding code the the SAVE button that requeries the second subform. The
syntax would look something like this....

Forms!NameOfTheParentForm.Form!NameOfTheSubform.Requery
 

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

Similar Threads


Top