473,503 Members | 10,046 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Refresh Calculated Value on Main form as data is input into subform

1 New Member
Access 2016/Windows 10
I have a pop-up subform where I input numeric values. In my main Form, I calculate the Average, SDev and Count of the values from subform (table) by using an aggregate query. What is the proper syntax for VB code to refresh/requery the aggregate query? I want it updated following each data value is entered.

I assume I add this to either the After Update event or On Current event? Link to screenshot below:
https://1drv.ms/u/s!Arn6mJyTZBnogc4Q...gPzaQ?e=AzPPA0
Nov 1 '21 #1
2 7908
isladogs
457 Recognized Expert Moderator Contributor
Have you tried Me.Recalc?
Nov 2 '21 #2
NeoPa
32,557 Recognized Expert Moderator MVP
The proper syntax would be Call X.Refresh() if no changes were made to add or remove records, but Call X.Requery() if such changes were made.

Unfortunately, your question doesn't make it clear where your VBA code is running from nor how your aggregate query is used within your main form. Both of these are likely to affect what X is.
Nov 3 '21 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1391
by: ethanj /personal/ | last post by:
I have main form with subform, similar to the Order Details form in the Northwind database. The the main form record locking is released when I click to edit subform's records. Is there away to...
4
6967
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
1
1797
by: gleave | last post by:
Hi, I have a problem with subforms. I want to lock a subform until all the required data is inputted in the main form. The required fields in main form: Invoice Number Invoice to The main...
0
1583
by: theBman | last post by:
I have 2 tables. One master, one child using Access 2003 (PC) Have 2 forms. The main form is continuous while the sub is datasheet. I can filter on the main form and the subform filters with...
1
2404
by: Elainie | last post by:
I have a main form and in it I have a datasheet subform filtered on surname, I would like the users to select a name in their list on the subform then the data moves up into the main form... Is...
2
3960
by: stpark22 | last post by:
Hello, I've constructed a form that contains a subform in Access 2003. I want to be able to set the tab order to tab through the fields of the main forms then tab through the fieldw of the subform...
27
29210
by: tragaz | last post by:
Hi There, I'm a beginer in Access and VB. In my Database, I've got a form with a subform. the subform is a query from a table different than the table of the main form. those tables don't have a...
30
2326
by: mminieri | last post by:
My main form has many tabbed subform pages, and a button for NEW record and one for EXISTING record. A user can access a specific existing record from a dropdown combobox that opens from that command...
7
2118
by: GeneH | last post by:
Hello, I am trying to requery a control on a main form from an AfterUpdate event of a control on a subform and then return back to the record and control at the subform. Instead i am returned to...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
5602
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4693
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3183
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3173
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1523
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
749
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
403
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.