I'm trying to get an Access report to print the number of pages of the group instead of the number of the whole report. The code I'm using is below. The Debug statement in the middle shows that the array is being built properly but the results on the report show the wrong number of pages in the groups.
For example, the first group has 5 pages. The array comes out as:
1, 2
2, 2
1, 3
2, 3
3, 3...
User Profile
Collapse
-
Catherine Dooley started a topic Code for Access Report group page numbers not returning the correct valuesin Visual BasicCode for Access Report group page numbers not returning the correct values
-
Actually, never mind. I've been working on this for days and I just fixed it by changing the sql. I still don't know why the previous one didn't work, but I've got a working version now. -
Why is my vba sql not returning the correct value for a field?
I'm using Access 2007. I have a fairly simple function (code below) that is meant to get a count of 1 field based on criteria in 2 other fields. It works fine when I copy the sql into a query, but when I run the function it returns 0 as the value. I'm sure there is something simple I'm missing, but I can't figure out what. Any ideas?
Public Function CCDNASub(myMont h As Integer, myYear As Integer) As Integer
Dim mySQL...
No activity results to display
Show More
Leave a comment: