A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Need to display blank fields



 
 
Thread Tools Display Modes
  #1  
Old July 23rd, 2007, 08:23 PM posted to microsoft.public.access.reports
Michael[_12_]
external usenet poster
 
Posts: 75
Default Need to display blank fields

It would be really good to have 26 records display per page (or at least on
1 page) even if there are only 2 records. In other words, today I have 2
checks but I need 24 blank records after to make up the entire deposit slip.
Someone mentioned a line method but I do not believe that would get me the
numbers 3. - 26. along side the blank records. Any ideas?


  #2  
Old July 23rd, 2007, 09:16 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Need to display blank fields

You could add code to the On Page event of your report like:
Private Sub Report_Page()
Dim intNumLines As Integer
Dim intLineNumber As Integer
Dim intTopMargin As Integer
Dim ctl As Control
Dim intLineHeight As Integer
Dim intLineLeft As Integer
Dim intLineWidth As Integer
intNumLines = 26
intLineLeft = 720 '1/2 inch from left margin
intLineWidth = 1440 * 5 '5 inches
intTopMargin = Me.Section(3).Height
intLineHeight = Me.Section(0).Height
Me.FontSize = 14
For intLineNumber = 0 To intNumLines - 1
Me.CurrentX = intLineLeft
Me.CurrentY = intTopMargin + _
(intLineNumber * intLineHeight)
Me.Print intLineNumber + 1
Me.Line (intLineLeft, intTopMargin + _
(intLineNumber * intLineHeight)) _
-Step(intLineWidth, 0)
Next
End Sub
--
Duane Hookom
Microsoft Access MVP


"Michael" wrote:

It would be really good to have 26 records display per page (or at least on
1 page) even if there are only 2 records. In other words, today I have 2
checks but I need 24 blank records after to make up the entire deposit slip.
Someone mentioned a line method but I do not believe that would get me the
numbers 3. - 26. along side the blank records. Any ideas?



  #3  
Old July 23rd, 2007, 09:59 PM posted to microsoft.public.access.reports
Larry Linson
external usenet poster
 
Posts: 3,112
Default Need to display blank fields


"Michael" wrote

It would be really good to have 26 records
display per page (or at least on 1 page) even
if there are only 2 records. In other words,
today I have 2 checks but I need 24 blank
records after to make up the entire deposit slip.
Someone mentioned a line method but I do
not believe that would get me the numbers
3. - 26. along side the blank records. Any ideas?


How about a separate 26-record table that you join to your table of actual
records, to force the lines? (You may have to "invent" a field to use for
joining, but that should be a solvable problem.)

Larry Linson
Microsoft Access MVP


  #4  
Old July 24th, 2007, 02:46 PM posted to microsoft.public.access.reports
Michael[_12_]
external usenet poster
 
Posts: 75
Default Need to display blank fields

I'm getting an overflow error from the following line of your code:

Me.CurrentY = intTopMargin + _
(intLineNumber * intLineHeight)

What do you make of that?

"Duane Hookom" wrote in message
...
You could add code to the On Page event of your report like:
Private Sub Report_Page()
Dim intNumLines As Integer
Dim intLineNumber As Integer
Dim intTopMargin As Integer
Dim ctl As Control
Dim intLineHeight As Integer
Dim intLineLeft As Integer
Dim intLineWidth As Integer
intNumLines = 26
intLineLeft = 720 '1/2 inch from left margin
intLineWidth = 1440 * 5 '5 inches
intTopMargin = Me.Section(3).Height
intLineHeight = Me.Section(0).Height
Me.FontSize = 14
For intLineNumber = 0 To intNumLines - 1
Me.CurrentX = intLineLeft
Me.CurrentY = intTopMargin + _
(intLineNumber * intLineHeight)
Me.Print intLineNumber + 1
Me.Line (intLineLeft, intTopMargin + _
(intLineNumber * intLineHeight)) _
-Step(intLineWidth, 0)
Next
End Sub
--
Duane Hookom
Microsoft Access MVP


"Michael" wrote:

It would be really good to have 26 records display per page (or at least
on
1 page) even if there are only 2 records. In other words, today I have 2
checks but I need 24 blank records after to make up the entire deposit
slip.
Someone mentioned a line method but I do not believe that would get me
the
numbers 3. - 26. along side the blank records. Any ideas?





  #5  
Old July 24th, 2007, 02:47 PM posted to microsoft.public.access.reports
Michael[_12_]
external usenet poster
 
Posts: 75
Default Need to display blank fields

Will you explain further because you made me think of also trying to force
26 records in the query that I'm using. Any way to do that?
"Larry Linson" wrote in message
...

"Michael" wrote

It would be really good to have 26 records
display per page (or at least on 1 page) even
if there are only 2 records. In other words,
today I have 2 checks but I need 24 blank
records after to make up the entire deposit slip.
Someone mentioned a line method but I do
not believe that would get me the numbers
3. - 26. along side the blank records. Any ideas?


How about a separate 26-record table that you join to your table of actual
records, to force the lines? (You may have to "invent" a field to use for
joining, but that should be a solvable problem.)

Larry Linson
Microsoft Access MVP




  #6  
Old July 24th, 2007, 03:13 PM posted to microsoft.public.access.reports
Michael[_12_]
external usenet poster
 
Posts: 75
Default Need to display blank fields

I need to also clarify that it needs to be dynamic so that if no matter how
many records I have the blank rows plus the rows that aren't blank should
equal 26 (28 in the future but right now I only have room for 26 and the 2
extra records aren't a deal break anyways).
"Michael" wrote in message
...
Will you explain further because you made me think of also trying to force
26 records in the query that I'm using. Any way to do that?
"Larry Linson" wrote in message
...

"Michael" wrote

It would be really good to have 26 records
display per page (or at least on 1 page) even
if there are only 2 records. In other words,
today I have 2 checks but I need 24 blank
records after to make up the entire deposit slip.
Someone mentioned a line method but I do
not believe that would get me the numbers
3. - 26. along side the blank records. Any ideas?


How about a separate 26-record table that you join to your table of
actual records, to force the lines? (You may have to "invent" a field to
use for joining, but that should be a solvable problem.)

Larry Linson
Microsoft Access MVP






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:53 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.