Hey if you wanna still help me with it still it would be greatly appreciated. I can email you a blank copy with fake records. I cannot send customer info out though. I can't upload here because it exceeds the file sizes.
You can email it to
removed for privacy
Two issues. The sample you sent does not contain the code that errors, so I'm not sure how I'm supposed to fix the problem. Second, even if I try to create that functionality, there is only one record, so impossible to test whether the code works or not.
Sorry... I sent you the wrong copy... I Will resend it... Command 40 on the contracts form is where the issue is occuring
Sorry, that was a serious brain cramp on my part. You want to refer to the control containing contract ID, not the button. You also need to bracket the field name, due to the inadvisable space:
DoCmd.OpenReport "contract by all", acViewPreview, , "[Contract ID] = " & Me.Contract_ID
Dude... Pbaldy you are my savior...
Glad we finally got it sorted out. Sorry I didn't notice the fact that you were referring to the button instead of the contract ID. An unfortunately not-so-rare "duh" moment of mine.
Hey I really appreciate all that you did to help with this. So I have to ask since have a copy of it. Is that a decent database for a first access project?
I don't want to not answer, but the truth is I can't remember (getting senile). The db is on my laptop at home, and I don't have 2007 on this machine to look at it. I don't recall anything jumping out at me, but I really just looked at the form and report related to this issue. Spaces in object names aren't worth the trouble in the long run. I seem to remember a lot of repetitively named objects, which I assume means you're creating new objects instead of using a parameter query. In other words, if you had queries for January sales, February sales, etc, you could have a single query with date parameters so the user could simply select their desired time frame.