I thought it would be obvious that you have code stopping the code below from executing properly. You commented everything else out but didn't comment out these two lines directly above the one I gave:
Code:
Dim stLinkCriteria As String
DoCmd.OpenReport "SearchCallDat", acViewPreview, , Me.Filter
Hey remember I told you I'm not the only that works on this database. I had no clue what that code does. I commented it out and plan to remove it later. Now it works but it still doesn't capture the end date.
for example if I want to search for records from 11/01 to 11/04, it would only give me up to 11/03. is there a "<=" (less than or equal) function I can use so those missing records can also display?
It looks like this is a sample search form you got from somewhere. Am I right?
When you're writing code in VBA, regularly Debug > Compile your code. Did you notice that even after you renamed txtBegDate it was coming up in the VBA editor when you typed Me.?
So the above was part of your problem plus the Date field contained a Time part to it and the criteria in the query was just wrong.
I have no clue where the person who created the database got this form. It was made before I got here.
I was overwhelmed by the lack of organization in the code, especially because I only understand like half of it. Therefore, I didn't feel like changing anything that might affect the structure. Sorry for giving you a headache. haha
When you're writing code in VBA, regularly Debug > Compile your code. Did you notice that even after you renamed txtBegDate it was coming up in the VBA editor when you typed Me.?