Private Sub Form_Open(Cancel As Integer)
Dim intNPWCount As Integer
Dim strNPWGID As String
Dim FName As String
FName = Me.Form.Name
intNPWCount = Nz(DCount("[MPGID]", "MPW_Weekly_TimeTracker", "[DeptID]='" & Forms![ManpowerOTPopulationF].[ComboDeptID] & "' And [WKNO]=" & Forms![ManpowerOTPopulationF].[TxtWKNO]), 0)
If intNPWCount <> 0 Then
For A = 1 To intNPWCount
DoCmd.GoToRecord acDataForm, FName, acGoTo, A
‘Other Commands
Next A
Else
Exit Sub
End If
End Sub
No comments:
Post a Comment