Hello,
I'm not great at VBA but have hammered someone else's code found on the internet into shape except for a couple of issues, the one I'm currently working on is that I can't search for a date. Someone on here mentioned use of #'s but I'm not sure how with the code I currently have - could be I need to re-write the section for the date..?
Currently I have:
which refers too:
Any help is very gratefully received! Thanks :)
I'm not great at VBA but have hammered someone else's code found on the internet into shape except for a couple of issues, the one I'm currently working on is that I can't search for a date. Someone on here mentioned use of #'s but I'm not sure how with the code I currently have - could be I need to re-write the section for the date..?
Currently I have:
Code:
Private Sub btnSearch_Click()
Dim sqlinput As Variant
' Update the record source
sqlinput = "SELECT * FROM FileInfQry " & BuildFilter
Debug.Print sqlinput
Me.FileInfSubForm.Form.RecordSource = sqlinput
' Requery the subform
Me.FileInfSubForm.Requery
Code:
' Check for Date Created
If Me.txtDateCreated > "" Then
varWhere = varWhere & "[DateCreated] = '" & Me.txtDateCreated & "' AND "
End If
Comment