Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report screen-bottom browser doesn’t work properly

Status
Not open for further replies.

Bresart

Programmer
Feb 14, 2007
314
ES
Hi, in a report with a subreport the page number is shown in a textbox with the property controlsource set to

=[Page]

and the pages total number is shown in another textbox with the property controlsource set to

=[Pages]

In preview screen, when going to the next page by clicking in that button in the browser at the bottom of the screen that shows the current page and buttons First, Previous, Next and Last, there’s no trouble in appearance, but when clicking in Last button, the value in the browser box that shows the current page doesn’t match with the report textbox that indicates the pages total number, the first shows sometimes 71, others 73, and the second shows always 74. And the report textbox that shows the page number matchs with the current page in the browser. The content of the page corresponds to the last page and not to the page shown in the browser and textbox, however if the page number 71 (or 73) is set for printing in the printing window it prints the real 71 (or 73) page correctly, and not the last page that is shown like the page 71 in the preview screen.

Sometimes, also images in the subreport haven’t been shown.

Is that problem something fixed and solved?


One more related question is that I remember that besides the browser at the bottom Access showed also the pages total number, that is, ‘Page 1 of 74’ (like records total number in forms), and now it would be missing that total. Am I remembering rightly? Access version is 2000 one.

Thanks.
 
This is dedicated to reports: forum703

When you create a report using the wizard, it will automaticall add:

[tt]="Page " & [Page] & " of " & [Pages][/tt]

To the page footer. Where on the report are the textboxes that are causing the problem?

When you say images, do you mean photos and such like? If so, have you already changed the registry?

This is a fairly definitive thread:
 
Thanks Remou.

Sorry that i posted in the wrong forum, i gauge it'll be better to follow now the thread in this forum instead of posting the thread again. Am i right?

I do use DBPix (developed by the first link is about a bug i hadn't fixed; i'll apply it, though i hadn't had that crashing and the trouble that i'm having isn't about that bug, like i explain after. About solving that crashing problem fixed in would it be a way of the initial DB form makes the registry changes (checking what OS is on the computer) when loading? And, would that shot the registry changes detector of softwares that watch out for that changes?

The second link is about showing images and photos, but that thread I haven’t seen that mention DBPix, wich solves by itself closely all said in the thread.



By making another report from scratch and pasting all the elements from the old report into the new one, that new report has no wrong working (without any code that the old had). First, I have added (copied from the old report and pasted into the new one) the code in Group0Header_Print event, and no error has appeared:


Private Sub Group0Header_Print(Cancel As Integer, PrintCount As Integer)
If Me.Text126.Value = "100" And Me.Text144.Value = "(100)" Then
Me. Group2Header.visible = False
Else
Me. Group2Header.visible = True
End If

Me.ScaleMode = 1
Me.ForeColor = 10987431

'Me.Line (15, 270)-(15, Me.Text200.Height + 365)
Me.Line (480, 270)-(480, Me.Text200.Height + 365)
Me.Line (1695, 270)-(1695, Me.Text200.Height + 365)
Me.Line (2265, 270)-(2265, Me.Text200.Height + 365)
Me.Line (4875, 270)-(4875, Me.Text200.Height + 365)
Me.Line (5745, 270)-(5745, Me.Text200.Height + 365)
Me.Line (6715, 270)-(6715, Me.Text200.Height + 365)
Me.Line (7615, 270)-(7615, Me.Text200.Height + 365)
Me.Line (8520, 270)-(8520, Me.Text200.Height + 365)
Me.Line (9600, 270)-(9600, Me.Text200.Height + 365)


End Sub



Following I have copied and pasted the code in Group2Header_Format event (that has made that same error type –browsing errors- appear again):


If Me.txtCampoFallado.Value <> "Identificación" Then
'MsgBox "Oculto. Campo fallado: " & Me.campoFallado.Value
Me.secImag.visible = False
Me.txtFruto.visible = False
Me.Etiqueta24.visible = False
Me.txtFamilia.visible = False
Me.Etiqueta25.visible = False
Else
Me.secImag.visible = True
Me.txtFruto.visible = True
Me.Etiqueta24.visible = True
Me.txtFamilia.visible = True
Me.Etiqueta25.visible = True

End If







In the new report created I didn’t remove the

="Page " & [Page] & " of " & [Pages]

added by the wizard in the page footer. Then, now I proved that in this textbox the values shown were also wrong, like in the textbox from the original (placed both in report header and page header). This should seem that the problem isn’t related to the textboxes, and confirm that it would be a code problem.


Thanks for any help given.
 
I have solved it by moving the code from the header OnPrint event to the header OnFormat event.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top