Hi
I have a recordset
This works fine and populates a subform. I want to click on the certain record and then filter for only that day. How so I do this
Thanks
Phil
I have a recordset
Code:
Private Sub ULDID_Click()
Dim dbsCurrent As Database
'Dim rstHUTF As DAO.Recordset === Globally Set
GULD_ID = Mid(cmbULD_ID.Value, 4, 5)
GULD_Carrier = Mid(Me.cmbULD_ID.Value, 9, 2)
GULD_Full_ID = cmbULD_ID.Value
Set dbsCurrent = CurrentDb
Set rstHUTF = Me.Recordset
Set rstHUTF = dbsCurrent.OpenRecordset( _
"SELECT STAMP, OPCOO, AREA, FLOW, USTATE, UCAT, WEIGHT, SHC, ULDID, INFLTID, OUTFLTID, DEST " _
& "FROM HIS_HUTF " _
& "WHERE STAMP BETWEEN #" & Format(GDate1, "mm/dd/yyyy") & " 00:00:01# AND #" & Format(GDate2, "mm/dd/yyyy") & " 23:59:59# AND ULDID like '" & GULD_Full_ID & "' " _
& "ORDER BY STAMP DESC", dbOpenDynaset)
With rstHUTF
If .RecordCount = 0 Then
MsgBox "No Records"
Else
HUFT_ULD_Trace_Details.Visible = True
.MoveLast
.MoveFirst
Set Forms!HUFT_ULD_TRACE!HUFT_ULD_Trace_Details.Form.Recordset = rstHUTF
End If
End With
End Sub
This works fine and populates a subform. I want to click on the certain record and then filter for only that day. How so I do this
Thanks
Phil