Sandra Smith
asked on
Loop and build Message for USer in Access 2003
Users in our database have only calendar days in which to entered data. I need to have a process that loops through the table and for each day four to seven days past today, create a message that informs the user which days are missing. I want to build one message but am not sure how to join the loops
Sandra
Private Sub CheckforDataEntry(strUserI D As String)
'Checks to see if the user has inputted data for days older than four from today
Dim intCount As Integer
Dim strMessage As String
Dim i As Integer
For i = 4 To 7
intCount = DCount("TaskDate", "tblCompletedTask", "UserID = '" & gstrUserID & "' AND TaskDate = Date() - " & i)
If intCount = 0 Then
'Do nothing
Else
strMessage = "You have no entries for the date: " & Date - i & " & vbCrLf"
End If
Next i
End Sub
Sandra
Private Sub CheckforDataEntry(strUserI
'Checks to see if the user has inputted data for days older than four from today
Dim intCount As Integer
Dim strMessage As String
Dim i As Integer
For i = 4 To 7
intCount = DCount("TaskDate", "tblCompletedTask", "UserID = '" & gstrUserID & "' AND TaskDate = Date() - " & i)
If intCount = 0 Then
'Do nothing
Else
strMessage = "You have no entries for the date: " & Date - i & " & vbCrLf"
End If
Next i
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sandra