InFlight
User
- Local time
- Today, 11:41
- Joined
- Jun 11, 2015
- Messages
- 130
When i run this code i only get 7 records but the debug.print tells me there are 8 records
If i run the query and use the text filter i get 8 records
If i run the query and use the text filter i get 8 records
Code:
Private Sub cmdAncestors_Click()
Dim strWhere As String
If Nz(TempVars!vBirdID, 0) = 0 Or TempVars!vBirdID = "" Then Exit Sub
strWhere = "RingNo = '" & TempVars!vBirdID & "'"
Debug.Print DCount("*", "qry_AncestorDetails", strWhere) & ", " & strWhere
If DCount("*", "qry_AncestorDetails", strWhere) = 0 Then
MsgBox TempVars!vBirdID & " has no Ancestors in the DataBase.", vbInformation, "No Ancestors"
Else
DoCmd.OpenForm "frm_AncestorDetails", acFormDS, , strWhere, acFormReadOnly
End If
End Sub