473,385 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Blanl Lines

How do you create blank lines with lines to fill such reports as invoices
and purchase orders?

Thanks!

Marie
Nov 13 '05 #1
10 1530
Steve,

Take off the dress and the pantyhose because you're not fooling anyone with
that 5 o’clock shadow. Stop masquerading as a woman so you can have a real
expert write the answer for you so you can charge your customer the
consultation fee for answering the question.

Or maybe your customer "Marie" can purchase a copy of your collection of VBA
code, available on CD for only $125! It's full of solutions like this,
because you copied them from the experts here!

Abe
"PC Datasheet" <no****@nospam.spam> wrote in message
news:BY****************@newsread3.news.pas.earthli nk.net...
How do you create blank lines with lines to fill such reports as invoices
and purchase orders?

Thanks!

Marie

Nov 13 '05 #2
PC Datasheet wrote:
How do you create blank lines with lines to fill such reports as invoices
and purchase orders?


The way I've done this is pretty messy. Try Googling the
archives for previous threads on this problem.

I'd Like to think there's a better way by using the Page
event to execute the Line method. If you can't find
something useful, post back and I'll see what I can work
out.

--
Marsh
MVP [MS Access]
Nov 13 '05 #3
Marsh,

I appreciate your response!

Here's an outline of what I used ---------------
Data for my report comes from a query. The query includes the primary key
and five fields from a table.
1. Create TblBlankLine:
TblBlankLine
ARow
A1
A2
A3
A4
A5
Set ARow data type to long integer and A1 to A5 data types to match the
data types of the fields in the query. ARow is numbered 5000001 to 5000028
2. I needed a total of 28 records and blank lines in my report. Put the
following in a standard module:
Function BlankLines()
Dim Items As Integer
Items = DCount("*", "MyQuery")
BlankLines = 28 - Items
End Function
3. Union MyQuery with TblBlankLine and include the Where clause:
WHERE TblBlankLine.ARow<=(BlankLines()+5000000)
4. Put the following in the ReportHeader_Format event:
Call BlankLines

When the report opens, BlankLines is calculated. The Union query returns 28
records; whatever number of records from MyQuery and the remainder as blank
lines. Note that the fields in the report must show their borders.

Steve
"Marshall Barton" <ma*********@wowway.com> wrote in message
news:nk********************************@4ax.com...
PC Datasheet wrote:
How do you create blank lines with lines to fill such reports as invoices
and purchase orders?


The way I've done this is pretty messy. Try Googling the
archives for previous threads on this problem.

I'd Like to think there's a better way by using the Page
event to execute the Line method. If you can't find
something useful, post back and I'll see what I can work
out.

--
Marsh
MVP [MS Access]

Nov 13 '05 #4
Marie wrote:
Here's an outline of what I used ---------------
Data for my report comes from a query. The query includes the primary key
and five fields from a table.
1. Create TblBlankLine:
TblBlankLine
ARow
A1
A2
A3
A4
A5
Set ARow data type to long integer and A1 to A5 data types to match the
data types of the fields in the query. ARow is numbered 5000001 to 5000028
2. I needed a total of 28 records and blank lines in my report. Put the
following in a standard module:
Function BlankLines()
Dim Items As Integer
Items = DCount("*", "MyQuery")
BlankLines = 28 - Items
End Function
3. Union MyQuery with TblBlankLine and include the Where clause:
WHERE TblBlankLine.ARow<=(BlankLines()+5000000)
4. Put the following in the ReportHeader_Format event:
Call BlankLines

When the report opens, BlankLines is calculated. The Union query returns 28
records; whatever number of records from MyQuery and the remainder as blank
lines. Note that the fields in the report must show their borders.

Thanks for posting back with your results. I think that's a
better approach than either of the ones I was thinking of.

Two minor questions:
1 ) Why number the blank lines way up in the 5000000 range?
That's a reasonable way if the invoice details are sorted by
their key value (row number).

2) Why do you call the BlankLines function in the Open
event? I don't see where this does anything!?
--
Marsh
MVP [MS Access]

P.S. How about fixing your From and Sig? It's kind of
confusing with all these different names.
Nov 13 '05 #5
See answers to questions below ---

Steve
"Marshall Barton" <ma*********@wowway.com> wrote in message
news:mj********************************@4ax.com...
Marie wrote:
Here's an outline of what I used ---------------
Data for my report comes from a query. The query includes the primary key
and five fields from a table.
1. Create TblBlankLine:
TblBlankLine
ARow
A1
A2
A3
A4
A5
Set ARow data type to long integer and A1 to A5 data types to match thedata types of the fields in the query. ARow is numbered 5000001 to 50000282. I needed a total of 28 records and blank lines in my report. Put the
following in a standard module:
Function BlankLines()
Dim Items As Integer
Items = DCount("*", "MyQuery")
BlankLines = 28 - Items
End Function
3. Union MyQuery with TblBlankLine and include the Where clause:
WHERE TblBlankLine.ARow<=(BlankLines()+5000000)
4. Put the following in the ReportHeader_Format event:
Call BlankLines

When the report opens, BlankLines is calculated. The Union query returns 28records; whatever number of records from MyQuery and the remainder as blanklines. Note that the fields in the report must show their borders.

Thanks for posting back with your results. I think that's a
better approach than either of the ones I was thinking of.

Two minor questions:
1 ) Why number the blank lines way up in the 5000000 range?
That's a reasonable way if the invoice details are sorted by
their key value (row number).


ARow matches up to InvoiceID in the Union query. So the Where clause becomes
a filter both to the InvoiceDetail records that are displayed as well as the
blank records from TblBlank records that are displayed. The 5000000 range is
insurance that no InvoiceDetail records get missed. If for example ARow in
TblBlankLines was numbered 1 to 30 and the Where clause:
WHERE TblBlankLine.ARow<=(BlankLines()+0)
was used, any InvoiceDetail record with InvoiceID greater than
(BlankLines()+0) would never get printed.

2) Why do you call the BlankLines function in the Open
event? I don't see where this does anything!?
The BlankLines function is called in the ReportHeader_Format event. This
calculates the value of BlankLines() used in the Where clause of the union
query.

--
Marsh
MVP [MS Access]

P.S. How about fixing your From and Sig? It's kind of
confusing with all these different names.

Nov 13 '05 #6
Continuing inline below
--
Marsh
MVP [MS Access]
PC Datasheet wrote:
See answers to questions below ---
Marie wrote:
>Here's an outline of what I used ---------------
>Data for my report comes from a query. The query includes the primary key
>and five fields from a table.
>1. Create TblBlankLine:
> TblBlankLine
> ARow
> A1
> A2
> A3
> A4
> A5
> Set ARow data type to long integer and A1 to A5 data types to matchthe >data types of the fields in the query. ARow is numbered 5000001 to5000028 >2. I needed a total of 28 records and blank lines in my report. Put the
>following in a standard module:
>Function BlankLines()
>Dim Items As Integer
>Items = DCount("*", "MyQuery")
>BlankLines = 28 - Items
>End Function
>3. Union MyQuery with TblBlankLine and include the Where clause:
>WHERE TblBlankLine.ARow<=(BlankLines()+5000000)
>4. Put the following in the ReportHeader_Format event:
>Call BlankLines
>
>When the report opens, BlankLines is calculated. The Union query returns28 >records; whatever number of records from MyQuery and the remainder asblank >lines. Note that the fields in the report must show their borders.


"Marshall Barton" wrote
Thanks for posting back with your results. I think that's a
better approach than either of the ones I was thinking of.

Two minor questions:
1 ) Why number the blank lines way up in the 5000000 range?
That's a reasonable way if the invoice details are sorted by
their key value (row number).


ARow matches up to InvoiceID in the Union query. So the Where clause becomes
a filter both to the InvoiceDetail records that are displayed as well as the
blank records from TblBlank records that are displayed. The 5000000 range is
insurance that no InvoiceDetail records get missed. If for example ARow in
TblBlankLines was numbered 1 to 30 and the Where clause:
WHERE TblBlankLine.ARow<=(BlankLines()+0)
was used, any InvoiceDetail record with InvoiceID greater than
(BlankLines()+0) would never get printed.


Gotch ya.

2) Why do you call the BlankLines function in the Open
event? I don't see where this does anything!?


The BlankLines function is called in the ReportHeader_Format event. This
calculates the value of BlankLines() used in the Where clause of the union
query.


But you call the function from the query, so calling it
again later doesn't affect the query.

If your invoice could possible go to more than one page and
you still need to fill out the last page, change the
function to use:

Items = DCount("*", "MyQuery") Mod 28

You came up with a nice approach here Steve and I'm glad I
stumbled into it.
Nov 13 '05 #7
<<But you call the function from the query, so calling it
again later doesn't affect the query.>>

I see your point and I'm going to test it out!

<<If your invoice could possible go to more than one page and
you still need to fill out the last page, change the
function to use:

Items = DCount("*", "MyQuery") Mod 28>>

Won't usually work because pages after page 1 usually don't have the report
header so more than 28 total lines will fit on the page.

In my current case I knew there would never be more than one page. However
when there is a possibility of the report being two pages but not more, you
might use something like this in the BlankLines function:
Items = DCount("*", "MyQuery")
Select Case Items
Case <= 28
BlankLines = 28 - Items
Case Else
BlankLines = 70 - Items
End Select

Here's something else I picked up off www.mvps.org/access that you might
want to use:
DoCmd.OpenReport "MyReport", acViewPreview
DoCmd.Maximize
Reports!MyReport.ZoomControl = 90

Your report will open at 90% magnification which is a perfect fit in the
report window.

Marsh,

I have always had a great respect for you from watching your responses to
posts. You have gained another big notch in my respect for you for your
courteous and professional response in this thread! I look forward to
continuing watching your answers to posts.

Steve


"Marshall Barton" <ma*********@wowway.com> wrote in message
news:nc********************************@4ax.com...
Continuing inline below
--
Marsh
MVP [MS Access]
PC Datasheet wrote:
See answers to questions below ---
Marie wrote:
>Here's an outline of what I used ---------------
>Data for my report comes from a query. The query includes the primary key >and five fields from a table.
>1. Create TblBlankLine:
> TblBlankLine
> ARow
> A1
> A2
> A3
> A4
> A5
> Set ARow data type to long integer and A1 to A5 data types to match
the
>data types of the fields in the query. ARow is numbered 5000001 to

5000028
>2. I needed a total of 28 records and blank lines in my report. Put
the >following in a standard module:
>Function BlankLines()
>Dim Items As Integer
>Items = DCount("*", "MyQuery")
>BlankLines = 28 - Items
>End Function
>3. Union MyQuery with TblBlankLine and include the Where clause:
>WHERE TblBlankLine.ARow<=(BlankLines()+5000000)
>4. Put the following in the ReportHeader_Format event:
>Call BlankLines
>
>When the report opens, BlankLines is calculated. The Union query
returns28
>records; whatever number of records from MyQuery and the remainder as

blank
>lines. Note that the fields in the report must show their borders.

"Marshall Barton" wrote
Thanks for posting back with your results. I think that's a
better approach than either of the ones I was thinking of.

Two minor questions:
1 ) Why number the blank lines way up in the 5000000 range?
That's a reasonable way if the invoice details are sorted by
their key value (row number).


ARow matches up to InvoiceID in the Union query. So the Where clause becomesa filter both to the InvoiceDetail records that are displayed as well as theblank records from TblBlank records that are displayed. The 5000000 range isinsurance that no InvoiceDetail records get missed. If for example ARow inTblBlankLines was numbered 1 to 30 and the Where clause:
WHERE TblBlankLine.ARow<=(BlankLines()+0)
was used, any InvoiceDetail record with InvoiceID greater than
(BlankLines()+0) would never get printed.


Gotch ya.

2) Why do you call the BlankLines function in the Open
event? I don't see where this does anything!?


The BlankLines function is called in the ReportHeader_Format event. This
calculates the value of BlankLines() used in the Where clause of the unionquery.


But you call the function from the query, so calling it
again later doesn't affect the query.

If your invoice could possible go to more than one page and
you still need to fill out the last page, change the
function to use:

Items = DCount("*", "MyQuery") Mod 28

You came up with a nice approach here Steve and I'm glad I
stumbled into it.

Nov 13 '05 #8
Steve,

See? You’ll get offers to help you when you post a question as Steve the
Access developer, instead of posing as a woman who needs help with her
Access database. You got quality feedback that was targeted to your level of
expertise, not basic instructions on how to proceed based on someone's guess
about your experience level. Marsh didn't have to spend extra time writing
stuff you didn't need, but that he probably would have given to someone
assumed to be less experienced than you are. You should always post as Steve
Santus or PC Datasheet so people know how best to help you without wasting
their time or yours.

I count 70 messages you've posted in the NGs in the last three months while
you've pretended to be other people, mainly women. I doubt that's anywhere
near the actual number of your covert posts. You masquerade as so many
different people so that you can get experts to unknowingly write the step
by step instructions for you to copy, and then you charge your customers for
these written instructions without compensating the guys who did the actual
work. The next time I see you doing that I will point it out to everybody,
especially if I see you wearing a dress and high heels again so everybody
else can laugh at you too.

Abe

"PC Datasheet" <no****@nospam.spam> wrote in message
news:A_*****************@newsread3.news.pas.earthl ink.net...
<<But you call the function from the query, so calling it
again later doesn't affect the query.>>

I see your point and I'm going to test it out!

<<If your invoice could possible go to more than one page and
you still need to fill out the last page, change the
function to use:

Items = DCount("*", "MyQuery") Mod 28>>

Won't usually work because pages after page 1 usually don't have the report header so more than 28 total lines will fit on the page.

-snip-

Marsh,

I have always had a great respect for you from watching your responses to
posts. You have gained another big notch in my respect for you for your
courteous and professional response in this thread! I look forward to
continuing watching your answers to posts.

Steve
-snip-
"PC Datasheet" <no****@nospam.spam> wrote in message
news:BY****************@newsread3.news.pas.earthl ink.net...
How do you create blank lines with lines to fill such reports as invoices
and purchase orders?

Thanks!

Marie

Nov 13 '05 #9
And if you are so honest, why don't you use your real name? Practice what
you preach!
"Honest Abe" <Ne*******************@NeverBox.comREMOVE_THIS> wrote in
message news:F4TNd.169$uc.157@trnddc01...
Steve,

See? You’ll get offers to help you when you post a question as Steve the
Access developer, instead of posing as a woman who needs help with her
Access database. You got quality feedback that was targeted to your level of expertise, not basic instructions on how to proceed based on someone's guess about your experience level. Marsh didn't have to spend extra time writing
stuff you didn't need, but that he probably would have given to someone
assumed to be less experienced than you are. You should always post as Steve Santus or PC Datasheet so people know how best to help you without wasting
their time or yours.

I count 70 messages you've posted in the NGs in the last three months while you've pretended to be other people, mainly women. I doubt that's anywhere
near the actual number of your covert posts. You masquerade as so many
different people so that you can get experts to unknowingly write the step
by step instructions for you to copy, and then you charge your customers for these written instructions without compensating the guys who did the actual work. The next time I see you doing that I will point it out to everybody,
especially if I see you wearing a dress and high heels again so everybody
else can laugh at you too.

Abe

"PC Datasheet" <no****@nospam.spam> wrote in message
news:A_*****************@newsread3.news.pas.earthl ink.net...
<<But you call the function from the query, so calling it
again later doesn't affect the query.>>

I see your point and I'm going to test it out!

<<If your invoice could possible go to more than one page and
you still need to fill out the last page, change the
function to use:

Items = DCount("*", "MyQuery") Mod 28>>

Won't usually work because pages after page 1 usually don't have the

report
header so more than 28 total lines will fit on the page.


-snip-

Marsh,

I have always had a great respect for you from watching your responses to posts. You have gained another big notch in my respect for you for your
courteous and professional response in this thread! I look forward to
continuing watching your answers to posts.

Steve


-snip-
"PC Datasheet" <no****@nospam.spam> wrote in message
news:BY****************@newsread3.news.pas.earthl ink.net...
How do you create blank lines with lines to fill such reports as invoices and purchase orders?

Thanks!

Marie


Nov 13 '05 #10
My name is Abe de los Santos. Does my name have any meaning to you? It
doesn't because you don't know me. People know you though. Your reputation
has spread far and wide because you try to deceive and take advantage of so
many of the very generous people here.

And since I do practice what I preach, I'll be honest with you. You're
shameless. And you look terrible in a dress and pantyhose.

Abe

"PC Datasheet" <no****@nospam.spam> wrote in message
news:Cf**************@newsread3.news.pas.earthlink .net...
And if you are so honest, why don't you use your real name? Practice what
you preach!

Nov 13 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jesse Noller | last post by:
I am a relative newbie to python and I am having issues trying to iterate over the lines of a file. I have a text file - foo.bar inside of this file are lines of text: x-3411342 y-1324123...
5
by: Brian | last post by:
Hello all.. Am working on an Air Hockey game... have an table loaded into a picture box. The borders of the table are slightly slanted. Am using hit testing lines with GDI+ to manipulate the...
2
by: m00nm0nkey | last post by:
Ok well i thought i'd try a different approach, so what I'm now trying is appending 50,000 lines from the collection to a stringbuilder, and then writing that entire stringbuilder to a file. ...
11
by: lovecreatesbeauty | last post by:
For example, line L1 and line L2 are two lines in two-dimensional space, the start-points and end-points can be described with following the `point_t' type. The start-points and end-points are:...
82
by: Edward Elliott | last post by:
This is just anecdotal, but I still find it interesting. Take it for what it's worth. I'm interested in hearing others' perspectives, just please don't turn this into a pissing contest. I'm in...
24
by: rudranee | last post by:
hi there, can anyone tell me how to lines from a file which are odd numbered i.e. 1st,3rd,5th...lines. i tried incrementing file pointer by 2 (fp=fp+2) but it does'nt work Can someone give me...
11
by: Girish Sahani | last post by:
I wrote the following code to concatenate every 2 keys of a dictionary and their corresponding values. e.g if i have tiDict1 = tiDict1 = {'a':,'b':} i should get tiDict2={'ab':} and similarly for...
7
by: peraklo | last post by:
Hello, there is another problem i am facing. i have a text file which is about 15000 lines big. i have to cut the last 27 lines from that file and create a new text file that contans those 27...
19
by: Pavan | last post by:
Hi, I want to know if there is any software for measuring lines of code of my c++ application. I found out a tool, sloccount, but it gives only physical lines of code. I found out one more...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.