Help on limit no of records in report

I'll tell you all I've done according to your instructions
1- Creating qryProcTypeCount Query
2- Join this query with the first one CurrentProc Query
3- put CountRecs in the report
4- Copy paste the code
 
is any relation with the vb references ???

in your file , you've selected DAO 3 ,, but in my report it's not selected
I tried to select but it refuse
 
Look ,,, your file is working more than perfect
when I put it in my db something wrong occurs
I don't know what to do with this case
 
Well, I'm afraid I can't help you any further if you're not willing to show the report.
 
no no
you misunderstand ,,, well I'll attach it
 
Let us know when you've attached it and I will tell you where you went wrong.
 
You attached the same report. I want to see the report that is not working.

Also, remember I mentioned to you that your sections are too tall. You've done the same thing with this report again. You have to make it short, as short as the report I attached. If you don't the page footer will disappear on the last page.
 
I didn't attach the same report, I told you that the same report works in your db and not in mine.
 
My friend

I think I knew my mistake
the procedures that I have are more than 1380 procedure
the code started by < 100
I think the mistake is here
Because when I deleted the other procedures ( I mean the unselected ) it works perfectly.
So what can I do now ??? should I edit this line in the Code or what ???

waiting you friend
 
Code:
Private Sub GroupHeader0_Print(Cancel As Integer, PrintCount As Integer)
    Dim intCountAll As Integer, isSolved As Boolean, counter As Integer
    Dim intNext As Integer
    
    If prevGroup = Nz(Me.txtProcType, vbNullString) Then
        pgNum = pgNum + 1
        Exit Sub
    End If
    
    prevGroup = Nz(Me.txtProcType, vbNullString)
    
    Me.Detail.ForceNewPage = 0
    
    intCountAll = Nz(Me.txtCountRecs, 0)

    ReDim pgNumbers(1 To ((intCountAll / 5) + 3))

    
    [COLOR=Red][B]Do While isSolved = False And counter < 100[/B][/COLOR]
 counter = counter + 1
 
in table "procedures" I have to store all the procedures for each employee, for later feedback
that's because I have a lot of procedures
 
The counter variable is just a safety net to ensure that the loop doesn't run endlessly. You can make that line:

Do While isSolved = False

Then remove the counter line too.
 
See attached. The query to count you created to count per type was wrong. And again, I will say that the height of your sections are too much. I have said this three times already and you don't seem to take any notice. If you use those kind of heights it WILL NOT WORK. The sections DO NOT have to be of such a height. I have adjusted it to a reasonable height now, keep it that way.

I also move the line where pgNum gets incremented, up a level.
 

Attachments

Users who are viewing this thread

Back
Top Bottom