Solved

Subform Won't Recalculate on New Record

Posted on 2010-08-26
12
447 Views
Last Modified: 2013-11-28
Hello,

I have a subform that when the parent form opens it does all the calculations in the subform for all the records that were there when it was closed. Although when I add a new record the subform produces the #Error in those fields trying to produce the calculations. What is the best way to refresh this subform to recalculate all the fields.
0
Comment
Question by:NuclearOil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 2
12 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 33530676

try,
 after saving the record
    me.requery
or
   me.recalc
0
 
LVL 18

Expert Comment

by:Cluskitt
ID: 33530743
Shouldn't it be: Me.SubformName.Requery?
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 33530801
depends on where you will execute the code.
he was adding a new record in the subform, so after saving the record, or in the afterupdate event of the subform, you can just place
    me.requery
or
   me.recalc
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 18

Expert Comment

by:Cluskitt
ID: 33530812
Ah yes, I had missed that part. You are, of course, correct. :)
0
 

Author Comment

by:NuclearOil
ID: 33536851
Nope, neither of them seem to work, should it be in a before insert to requery the subform?
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 33537049
can upload a copy of your db
0
 

Author Comment

by:NuclearOil
ID: 33537261
Please look at the form Order Processing.The subform is linked to Stock Number in the main form. If you create a new record and use the stock number MB-08, you'll see the #Error. If you notice on when you load the form, the calculations happen.
-Error.mdb
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 33537388
please upload a working form..
the rowsource of the combo box at the main form is missing..

also include the instruction "how do you" create the new record using the subform
0
 

Author Comment

by:NuclearOil
ID: 33537928
I added the row source for you. Its just a list of customers. I haven't made the form for the inventory yet, I have just been adding records to the table InventoryNPO to test the form they use to enter new orders and check stock.
-Error.mdb
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 33537956
how do you create "NEW record"?
0
 

Accepted Solution

by:
NuclearOil earned 0 total points
ID: 33549361
I just hit the start button on the bottom of the main form for the time beining. If you add the stock number MB-08, you will get that #error.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 33549562
how do you do that in the sample db that you uploaded?
there is no start button..

mind checking the sample db to reproduce the error before uploading
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question