Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / October 2004

Tip: Looking for answers? Try searching our database.

repeated records when i copied the controls.b

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alexm - 04 Oct 2004 08:55 GMT
i made a costum report of many controls in the detail section and it fits
five records max based on a query, my problem is if there is less than five
records then it leaves the remaining sheet  blank, i want to be able to have
five records on a sheet even if there is no data in the rest of them so that
data can be filled by hand later on. i tried copying all the controls and
pasting them but it only displays one record repeated 5 times.

thanks for ur help:)
Duane Hookom - 04 Oct 2004 16:26 GMT
You haven't really said what you would expect to see in the blank areas. You
could add lines with code like below. The code could be modified to print
any text or whatever.
'---------------------------------------------------------------------------
------------
' Procedure : Report_Page
' DateTime  : 8/9/2004 14:13
' Author    : hookomd
' Purpose   :
'---------------------------------------------------------------------------
------------
'
Private Sub Report_Page()
   Dim intNumLines As Integer
   Dim intLineNum As Integer
   Dim intDetailHeight As Integer
   Dim intPageHeadHeight As Integer
  On Error GoTo Report_Page_Error

   intNumLines = 5
   intDetailHeight = Me.Section(acDetail).Height
   intPageHeadHeight = Me.Section(3).Height
   For intLineNum = 1 To intNumLines
       Me.Line (0, intPageHeadHeight + intLineNum * intDetailHeight)- _
           Step(Me.Width, 0)
   Next

  On Error GoTo 0
  Exit Sub

Report_Page_Error:
   Select Case Err
       Case 2462  'no page header
           intPageHeadHeight = 0
           Resume Next
   End Select
   MsgBox "Error " & Err.Number & " (" & Err.Description & _
       ") in procedure Report_Page of VBA Document Report_Report1"

End Sub

Signature

Duane Hookom
MS Access MVP
--

> i made a costum report of many controls in the detail section and it fits
> five records max based on a query, my problem is if there is less than five
[quoted text clipped - 4 lines]
>
> thanks for ur help:)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.