Totals

Xander117

Board Regular
Joined
Aug 3, 2011
Messages
66
Okay I know there has to be an easy way to do this. I have a subform, that allows the user to enter in the type of error (Combo),number of errors(number), comments (memo), and type of testing (yes/no). Everything works great except for the fact that in order to get my total line for number or errors to work I have to refresh. There is a master/child relationship between like fields on the form and subform.

Is there an on click command or anything really that I can use to get it to refresh my total line as the user adds in errors? I tried doing an on-click macro to refresh, that didnt work. I want to be able to use this line to feed some calculations, and dont want to have to tell them they have to hit refresh before it works right.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
In the subform you can include something like the following if the formula is the control source:
Code:
 Private Sub myControl_LostFocus()
Forms!MainForm.Recalc
End Sub

Or else, you could just modify it to do the calculations in VBA. Check out this link to see how communication between main and subforms occurs:

http://access.mvps.org/access/forms/frm0031.htm
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,903
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top