Data Range on a Form~!~

Give me an example of the values you entered.
 
Yes, the dates.
 
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.

See attached.
 

Attachments

It looks like this is a sample search form you got from somewhere. Am I right?
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.?
For some reason I use to hit Ctrl + 8 (Run to Cursor).

I tried it and renamed a few things on the actual database to make it more legible. Now it works. I tried it various ways and it works perfectly now.

Thanks again for your immense help, I really don't know what I would do without your help hahaha :D:D:Dyou are awesome!!!

Hopefully this is the end of this database... :p
 
Glad that worked for you.

As for the Compile thing, I don't think there's a shortcut key for it in the VBA editor. You can try searching on the net though.

I'm sure you will be back pretty soon ;)

Good luck with the rest of your project!
 

Users who are viewing this thread

Back
Top Bottom