this is a portion of the code from my form
============================================
' NEW JOBORDER
If Text14 = "STRT" Then
If Left(Text16, 2) = "CI" Or Left(Text16, 2) = "CP" Or Left(Text16, 2) = "C2" Or Left(Text16, 4) = "PROT" Or Left(Text16, 4) = "PROD" Then
?????????????????????????????????????????
If TOTRECS <> 0 Then
MsgBox "THERE ARE " & TOTRECS & " JOBORDERS OPEN", vbOK + vbExclamation
Exit Sub
End If
DoCmd.GoToRecord , , acNewRec
If Text16 = "PRODUCTION" Or Text16 = "PROTOTYPING" Then
[JO#] = Text16
Else
[JO#] = Mid(Text16, 2)
End If
CI = Text16
MSETUOPER = Text12
JOST = "OPEN"
INI = Text12
CO = Text12
TAR = " "
[tblTIME.PT#] = [tblACTIONS.PT#]
[tblTIME.REV] = " & [tblACTIONS.REV] & "
Text12.SetFocus
===================================================
where you see many ?????'es i want to calculate a value TOTRECS by running sub from my module called ommon_operations, here is the sub
============================================
Public sub ACTIVE_JO_COUNT()
reccnt = Text209
OPNrecs = 0
TOTRECS = 0
Forms!TIMECAPTURE.SetFocus
DoCmd.GoToRecord , , acFirst
While reccnt > 0
If INI = Text12 Then
If ((MRUNST > MRUNEND) Or (Format(MRUNST, "@"
<> "" And Format(MRUNEND, "@"
= ""
) Or ((MSETST > MSETEND) Or (Format(MSETST, "@"
<> "" And Format(MSETEND, "@"
= ""
) Or ((FINST > FINEND) Or (Format(FINST, "@"
<> "" And Format(FINEND, "@"
= ""
) Or ((PNTST > PNTEND) Or (Format(PNTST, "@"
<> "" And Format(PNTEND, "@"
= ""
) Then
OPNrecs = 1 + OPNrecs
End If
TOTRECS = 1 + TOTRECS
End If
reccnt = reccnt - 1
DoCmd.GoToRecord , , acNext
Wend
so what do I have to write in the line instead of ??????????
so that the calculation of TOTORECS will take place and then the value would be used further in the code of my form A.
Good luck,
Kuzz
"Time spent debating the impossible subtracts from the time during which you
can try to accomplish it."
Good luck,
Kuzz
"Time spent debating the impossible subtracts from the time during which you
can try to accomplish it."
============================================
' NEW JOBORDER
If Text14 = "STRT" Then
If Left(Text16, 2) = "CI" Or Left(Text16, 2) = "CP" Or Left(Text16, 2) = "C2" Or Left(Text16, 4) = "PROT" Or Left(Text16, 4) = "PROD" Then
?????????????????????????????????????????
If TOTRECS <> 0 Then
MsgBox "THERE ARE " & TOTRECS & " JOBORDERS OPEN", vbOK + vbExclamation
Exit Sub
End If
DoCmd.GoToRecord , , acNewRec
If Text16 = "PRODUCTION" Or Text16 = "PROTOTYPING" Then
[JO#] = Text16
Else
[JO#] = Mid(Text16, 2)
End If
CI = Text16
MSETUOPER = Text12
JOST = "OPEN"
INI = Text12
CO = Text12
TAR = " "
[tblTIME.PT#] = [tblACTIONS.PT#]
[tblTIME.REV] = " & [tblACTIONS.REV] & "
Text12.SetFocus
===================================================
where you see many ?????'es i want to calculate a value TOTRECS by running sub from my module called ommon_operations, here is the sub
============================================
Public sub ACTIVE_JO_COUNT()
reccnt = Text209
OPNrecs = 0
TOTRECS = 0
Forms!TIMECAPTURE.SetFocus
DoCmd.GoToRecord , , acFirst
While reccnt > 0
If INI = Text12 Then
If ((MRUNST > MRUNEND) Or (Format(MRUNST, "@"
OPNrecs = 1 + OPNrecs
End If
TOTRECS = 1 + TOTRECS
End If
reccnt = reccnt - 1
DoCmd.GoToRecord , , acNext
Wend
so what do I have to write in the line instead of ??????????
so that the calculation of TOTORECS will take place and then the value would be used further in the code of my form A.
Good luck,
Kuzz
"Time spent debating the impossible subtracts from the time during which you
can try to accomplish it."
Good luck,
Kuzz
"Time spent debating the impossible subtracts from the time during which you
can try to accomplish it."