I am trying to search an access database for a range of appointment date it gives me an error or it send the date back that are not within the range.
Dim Searchbeg As String
Dim searchend As String
frmresults.Cls
'Orders Records by appointment
Searchbeg = (InputBox("Enter beginning date of search"
)
searchend = (InputBox("Enter end date of search"
)
Searchbeg = Format(Searchbeg, "short Date"
datContactManager.RecordSource = "Select * FROM ContactManager ORDER by apptdate Asc"
datContactManager.RecordSource = "Select * FROM ContactManager WHERE [apptdate] > = '" & Searchbeg & "' and <='" & searchend & "'"
datContactManager.Recordset.FindFirst("apptdate"
= Searchbeg '
datContactManager.Refresh
Call printsrch2
Dim Searchbeg As String
Dim searchend As String
frmresults.Cls
'Orders Records by appointment
Searchbeg = (InputBox("Enter beginning date of search"
searchend = (InputBox("Enter end date of search"
Searchbeg = Format(Searchbeg, "short Date"
datContactManager.RecordSource = "Select * FROM ContactManager ORDER by apptdate Asc"
datContactManager.RecordSource = "Select * FROM ContactManager WHERE [apptdate] > = '" & Searchbeg & "' and <='" & searchend & "'"
datContactManager.Recordset.FindFirst("apptdate"
datContactManager.Refresh
Call printsrch2