VBA works on one form, but not (almost indentical) other...

Heatshiver

Registered User.
Local time
Tomorrow, 05:50
Joined
Dec 23, 2011
Messages
263
I have two, nearly identical, forms. One is for metric calculations and the other for imperial. The metric works perfectly, the imperial does not...

The forms consist of 4 subforms. All the subforms on the metric will show without issue. The subforms will also show on the imperial, but the following VBA code will not work...

Me.[fsubDiscSum].Form.[AveOOCWgt%].Value = Me.[fsubAOOCTotalI].Form.[AveOOC].Value
Me.[fsubDiscSum].Form.[VolCutDiscfromCuttingsDryers].Value = Me.[fsubAOOCTotalI].Form.[WellSummary-T6].Value
Me.[fsubDiscSum].Form.[VolCutDisc].Value = Me.[fsubAOOCTotalI].Form.[Total].Value
Me.[fsubDiscSum].Form.[VolCutDiscfromShakers].Value = Me.[fsubAOOCTotalI].Form.[VolCutDiscfromShaker].Value
Me.[fsubDiscSum].Form.[VolMudDisc].Value = Me.[fsubVolCutMudI].Form.[VolCutMud].Value
Me.[fsubDiscSum].Form.[VolCutDiscfromCent1].Value = Me.[fsubCentsTotalI].Form.[VolCutDiscfromCent1].Value
Me.[fsubDiscSum].Form.[VolCutDiscfromCent2].Value = Me.[fsubCentsTotalI].Form.[VolCutDiscfromCent2].Value
Me.[fsubDiscSum].Form.[VolCutDiscfromCent3].Value = Me.[fsubCentsTotalI].Form.[VolCutDiscfromCent2].Value
Me.[fsubDiscSum].Form.[VolCutDiscfromCents].Value = Me.[fsubCentsTotalI].Form.[VolCutDiscfromCents].Value


The only difference is the "I" (Imperial) in the subform of the second value. The fsubDiscSum stays the same for both forms. For whatever reason I get the 2465 error. I checked the calculations from the query and they work, so I know it's not that.

I've been racking my brain to figure this out and can't think of what is wrong. Any help would be much appreciated. Thanks!
 
I fixed it and I believe the solution was that one criteria in the query was off in terms of type. Thanks!
 

Users who are viewing this thread

Back
Top Bottom