I've got some vb code that gives me a "previous operation cancelled" error when I try and open the form as a subform in a tabbed control. When I open the form itself I don't get the error. Does DSum() not agree with the tabbed control?
I'm posting the code below.
Private Sub Form_Load()
ERROR STARTS HERE and continues to the next line if I remove the previous function.
DSumDay = DSum("[Day]", "StandsQ")
DSumNight = DSum("[Night]", "StandsQ")
DSumNVG = DSum("[NVG]", "StandsQ")
DSumHood = DSum("[Hood]", "StandsQ")
Text89 = DMax("[Date]", "StandsQ", "[STANDS Eval] = True")
Text90 = DMax("[Date]", "StandsQ", "[INST Eval] = True")
Text91 = DMax("[Date]", "StandsQ", "[NVG Eval] = True")
Text92 = DMax("[Date]", "StandsQ", "[NO NOTICE] = True")
Text93 = DMax("[Date]", "StandsQ", "[Table III/IV] = True")
Text94 = DMax("[Date]", "StandsQ", "[Table VII/VIII] = True")
Text95 = DMax("[Date]", "StandsQ", "[Table IX/X] = True")
SAEH = DMax("[Date]", "StandsQ", "[SAEH] = True")
FADEC = DMax("[Date]", "StandsQ", "[FADEC] = True")
CBAT = DMax("[Date]", "StandsQ", "[CBAT] = True")
CBRN = DMax("[Date]", "StandsQ", "[CBRN] = True")
[Last NVG] = DMax("[Date]", "StandsQ", "[NVG] > 0")
[Last Flt] = DMax("[Date]", "StandsQ")
Total = DSumDay + DSumNight + DSumNVG + DSumHood
[NVG Time] = DSumNVG
[PC Time] = DSum("[Day] + [Night] + [NVG] + [Hood]", "StandsQ", "[PC] = True")
End Sub
I'm posting the code below.
Private Sub Form_Load()
ERROR STARTS HERE and continues to the next line if I remove the previous function.
DSumDay = DSum("[Day]", "StandsQ")
DSumNight = DSum("[Night]", "StandsQ")
DSumNVG = DSum("[NVG]", "StandsQ")
DSumHood = DSum("[Hood]", "StandsQ")
Text89 = DMax("[Date]", "StandsQ", "[STANDS Eval] = True")
Text90 = DMax("[Date]", "StandsQ", "[INST Eval] = True")
Text91 = DMax("[Date]", "StandsQ", "[NVG Eval] = True")
Text92 = DMax("[Date]", "StandsQ", "[NO NOTICE] = True")
Text93 = DMax("[Date]", "StandsQ", "[Table III/IV] = True")
Text94 = DMax("[Date]", "StandsQ", "[Table VII/VIII] = True")
Text95 = DMax("[Date]", "StandsQ", "[Table IX/X] = True")
SAEH = DMax("[Date]", "StandsQ", "[SAEH] = True")
FADEC = DMax("[Date]", "StandsQ", "[FADEC] = True")
CBAT = DMax("[Date]", "StandsQ", "[CBAT] = True")
CBRN = DMax("[Date]", "StandsQ", "[CBRN] = True")
[Last NVG] = DMax("[Date]", "StandsQ", "[NVG] > 0")
[Last Flt] = DMax("[Date]", "StandsQ")
Total = DSumDay + DSumNight + DSumNVG + DSumHood
[NVG Time] = DSumNVG
[PC Time] = DSum("[Day] + [Night] + [NVG] + [Hood]", "StandsQ", "[PC] = True")
End Sub
Comment