Thank you NeoPa,
I thought that post #32 was the best, until that, I was dreading making the whole report again.
Regards,
Trevor.
User Profile
Collapse
-
Yeah, I'm really pleased and a bit more au fait with Access. Thanks to you all.
Trevor.Leave a comment:
-
Hi Phil, Yes. I've done it all now, including calculations and it's all working properly. I must say that your comment about the changing of the table as the recordsource to a query wouldn't be too difficult, I was a bit sceptical, but you were smack on. It was so simple really.
So again, thank you all so much, I would have spent months finding out what I've found out here.
Trevor.Leave a comment:
-
O.k., understand. I'll get back when I've done it, might be an hour or so. Thanks for the screenshot.
T.Leave a comment:
-
Hello Phil, I do apologise, I was flushed with success and away to finish the report. The answer is yes and I did mention that all was working on page 1. I also tried the query in other months by changing the system date and it all seems to be working. I then asked NeoPa another question which he has answered and I replied. I'm sorry again and thank you so much for your help, all of you.Leave a comment:
-
Yes, the field is an expression in the query as ThursdayCount:C ountThursdays(D ate()) so I have dragged that query field into the report and it works. I can therefore put 2 other textboxes onto the report and the source in theirs control will be the '=CountThursday s(Date())'.
Thank you all again,
Trevor.Leave a comment:
-
Hi Folks, Thanks for your posts. As NeoPa said, I hadn't realised until at least half way through this thread that some kind of parameter had to passed to the function. Once I had read about the properties of the necessary parameter/s within the parentheses, all was clearer, some might say obvious. Even in the Access 2016 bible though did I read that the function had to have a name specifying that it was in a module, I do now.
So brimming with...Leave a comment:
-
Hi Guys, Can we leave this until tomorrow afternoon now please, can't see the text for yawning? If you have the next suggestion, please post it if you wish and I'll get back.
Thanks,
Trevor.Leave a comment:
-
Yes, I did that this afternoon. The report works more or less, I of course need to change a few things on the calculated controls because the calculations aren't yet in the query. Generally though I can see that it will work. All I need to know is how to put that 'call' to the function onto the report. I have placed a textbox for ThursdayCount into the report as ThursdayCount(D ate()). ThursdayCount is the name of the expression that Phil gave me...Leave a comment:
-
Hello,
I am paying attention, but if I'm missing something or I don't understand something, I must ask again or I would be wasting everyone's time.
I have created a query with all of the fields but as I said in my post #23 six hours ago 'How do I get the result of this query expression onto the report?' The expression isn't on the list of fields even though it is in the query and I've changed the recordsource. Since then Phil and I and...Leave a comment:
-
Just to clarify again, what do I place on the report and as it's contro; source, a textbox called modCountThursda ys. But I have to pass the Date() to the function, exactly how please?Leave a comment:
-
Yes, that returns a 5. Shall I change the system date and try a few different months? Or what next?Leave a comment:
-
-
Just to clarify though, the name of the actual module IS CountThursdaysLeave a comment:
-
-
Yep, copied and pasted
Public Function CountThursdays( InvoiceDate As Date) As IntegerLeave a comment:
-
Yes, I did that, see post #45. 'Compile error 'Expected variable or procedure, not module''Leave a comment:
-
I don't have anything referring to Thursdays in the table any more as you said I shouldn't have.Leave a comment:
-
Still the same error. Even after re-starting Access. I have the code in a module, and if I enter ? CountThursdays date() I get a compile error of type mismatch. I've tried all permutations of a proper date, with and without parentheses a comma etc, but still the same.Leave a comment:
-
No, It gives an error - Un-defined Function 'CountThursdays ' in ExpressionLeave a comment:
No activity results to display
Show More
Leave a comment: