R
Ray
Am having problems with the syntax of the Time section of
the following code. Can you help
If Not IsNull(Me![StartDate]) Then
vStr = "[Date]>" & Me![StartDate] & "#"
End If
If Not IsNull(Me![EndDate]) Then
If Not IsNull(vStr) Then vStr = vStr & " And "
vStr = vStr & "[Date]<" & Me![EndDate] & "#"
End If
'........Time..............................
If Not IsNull(Me![StartTime]) Then
If Not IsNull(vStr) Then vStr = vStr & " And "
vStr = vStr & "[Time]>#" & "#" & Me![StartTime] & "#"
End If
If Not IsNull(Me![EndTime]) Then
If Not IsNull(vStr) Then vStr = vStr & " And "
vStr = vStr & "[Time]<#" & "#" & Me![EndTime] & "#"
End If
stLinkCriteria = vStr
DoCmd.OpenForm stDocName, , , stLinkCriteria
the following code. Can you help
If Not IsNull(Me![StartDate]) Then
vStr = "[Date]>" & Me![StartDate] & "#"
End If
If Not IsNull(Me![EndDate]) Then
If Not IsNull(vStr) Then vStr = vStr & " And "
vStr = vStr & "[Date]<" & Me![EndDate] & "#"
End If
'........Time..............................
If Not IsNull(Me![StartTime]) Then
If Not IsNull(vStr) Then vStr = vStr & " And "
vStr = vStr & "[Time]>#" & "#" & Me![StartTime] & "#"
End If
If Not IsNull(Me![EndTime]) Then
If Not IsNull(vStr) Then vStr = vStr & " And "
vStr = vStr & "[Time]<#" & "#" & Me![EndTime] & "#"
End If
stLinkCriteria = vStr
DoCmd.OpenForm stDocName, , , stLinkCriteria