Eljefegeneo
Still trying to learn
- Local time
- Today, 15:06
- Joined
- Jan 10, 2011
- Messages
- 902
Don't know which topic to put this under but since the report was the problem it is here. Originally written yesterday, July 31, which when reading my question makes more sense.
I have invoices I need to print each month, mostly to the same clients. While I want to print the before the first of the month, I want to show the Invoice Date as the first of the following month. I.E. If I printed them yesterday or today, I want them to print August 1, 2018. First I thought, let's just use this is the Invoice Date field:
Works fine except that if I printed them tomorrow, it would be September 1, 2018.
So I used the following in the query to select a date based upon either an entered date on another form or based on the Date() of today.
The query works fine, that is, gives me the exact date I want. But when I try to put the field InvD on the report, I get an error message saying that:
Error Message "3061"
Too Few Parameters. Expected 1
My question is why. I have found that if I have all the fields for a report in my underlying query, I am less susceptible to errors showing up.
I have invoices I need to print each month, mostly to the same clients. While I want to print the before the first of the month, I want to show the Invoice Date as the first of the following month. I.E. If I printed them yesterday or today, I want them to print August 1, 2018. First I thought, let's just use this is the Invoice Date field:
Code:
= Format(DateSerial(Year(Date()),1+Month(Date()),1),"mmmm d"", ""yyyy")
So I used the following in the query to select a date based upon either an entered date on another form or based on the Date() of today.
Code:
InvD: IIf(IsNull([Forms]![frmMainMenu]![InvoiceDate]),Format(DateSerial(Year(Date()),1+Month(Date()),1),"mmmm d"", ""yyyy"),Format([Forms]![frmMainMenu]![InvoiceDate],"mmmm d"", ""yyyy"))
Error Message "3061"
Too Few Parameters. Expected 1
My question is why. I have found that if I have all the fields for a report in my underlying query, I am less susceptible to errors showing up.