I'm working on building a search form for my db. Main form is frmSeach and subform is frmProjectTaskSearch. The subform is pulling from a table where I have a stored record called ArrivalTime, which is actually a datetime field. However, when searching I'm trying search the whole day. I'm getting a error telling inconsistent formatting. I've tried adding in the format option into the code, but I've still got something wrong. Can anyone help, I've never tried this before.
Private Sub txtStartDate_AfterUpdate()
Dim myStartDate As String
myStartDate = "Select * from tblProjects where (Format([ArrivalTime], "mm/dd/yyyy") = '" & Me.cboOriginator & "')"
Me.frmProjectTaskSearch.Form.RecordSource = myStartDate
Me.frmProjectTaskSearch.Form.Requery
End Sub
Thanks,
Dan