473,327 Members | 2,074 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,327 software developers and data experts.

Need Blank Lines in Report

I have attached my MS Access File. After data entered in Job Card (including Invoice Tab) and When Print Invoice Button is created it prints the invoice. BUT I NEED MINIMUM 10 LINE ITEMS IN THE INVOICE DETAIL. Suppose there are 2 line items with data balance 8 can be blank lines, if 9 line are with data balance 1 blank line and if there are 15 line items all 15 with out any blank line should be there in the invoice print out. I tried all the way. But nothing succeeded. I am very bad in VB Codes.

Someone please help me with this. I have uploaded my file.
Attached Files
File Type: zip Invoce Software.zip (262.5 KB, 62 views)
Apr 14 '14 #1
8 1369
Rabbit
12,516 Expert Mod 8TB
Sorry, but as a rule of thumb, I do not download attachments from strangers.

You don't need any VBA code. What you can do is create a table with 10 blank rows and use a union all query to append the number of rows you need.
Apr 14 '14 #2
Thank you Rabbit for your reply.... There is a small change in my concept. After reading your reply only I realized, if there are more than 10 line data in the invoice, it would display only 10 line items and the invoice will be incomplete.
Kindly help.
Apr 15 '14 #3
zmbd
5,501 Expert Mod 4TB
in which case you'll want to review the following thread:
http://bytes.com/topic/access/answer...-empty-records
We're still using a union query in this thread, we're simply appending a enough blank records to fill out the report detail, in the above thread, 15 total, for your's 10 total.

If you need more help understanding the above thread's contents, please start a new thread with reference back to this thread and/or the thread above.
Apr 15 '14 #4
Thank you Zmbd.... But it will restrict the line to 10 irrespective of number of data, right? Suppose there are 13 data in the record, it will record only the first 10 records and will omit the balance 3 data lines. Hence the report will be incomplete. What to do if I need minimum 10 lines and if there are 13 lines in data, then I need all 13 in the report.
Please help.
Apr 26 '14 #5
zmbd
5,501 Expert Mod 4TB
Why don't you actully run the query and the report as the link has shown for the union query; doing so will answer your question. (^_^)
Apr 26 '14 #6
I tried it yesterday,.... created a blank table same as my primary table then created a query like below;

Expand|Select|Wrap|Line Numbers
  1. SELECT Null AS [IDField]
  2.      , *
  3. FROM   [tblEvidence]
  4. UNION ALL
  5. SELECT [IDField]
  6.      , Null
  7.      , Null
  8.      , ... etc
  9. FROM   [tblBlank]
  10. WHERE  ([IDField] Between ((((SELECT Count(*)
  11.                              FROM   [tblEvidence]) - 1) Mod 15) + 2) And 15)
  12.  
It gave some error message due to the word "etc".

Then I tried the other code;

Expand|Select|Wrap|Line Numbers
  1. SELECT Null AS [IDField]
  2.    , *
  3. FROM [tblEvidence]
  4.    UNION ALL
  5. SELECT [IDField]
  6. FROM   [tblBlank]
  7. WHERE  ([IDField]
  8.    Between ((((
  9.       SELECT Count(*)
  10.       FROM   [tblEvidence]) - 1) Mod 15) + 2)
  11.     And 15)
Then it returned an error, column in both tables are not same... but i had given the same column like my primary table....

Above all I am just a beginner in MS Access and just copy paste VBA Codes without any idea :)

Help would be highly appreciated.
Apr 27 '14 #7
zmbd
5,501 Expert Mod 4TB
Above all I am just a beginner in MS Access and just copy paste VBA Codes without any idea :)
And that is a problem

- If you understood what you were doing, you would have realized that "etc..." isn't a valid SQL construct.

- If you had actually read the thread that I linked you to, you would have seen in both in NeoPa and my own post how to handle the column issue. You would also understand how your second SQL script is malformed.

I can understand that it can be frustrating to have people tell you that you need to learn something instead of just coughing up the answers; however, that does you no good and and makes us nothing more than unpaid programmers.

What I am going to send you via PM is a listing of tutorials and reference links. You must have a mastery of the first tutorial in order to have the basic knowledge base needed to get Access to do anything useful - and without this mastery, the more advanced concepts as you have asked for here will never make sense to you.

Check your Bytes.com Inbox in about 5 minutes from this posting time.
Apr 27 '14 #8
Thank you so much Zmbd.
Apr 27 '14 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Ruben | last post by:
Hello. I am trying to read a small text file using the readline statement. I can only read the first 2 records from the file. It stops at the blank lines or at lines with only spaces. I have a...
0
by: Luke Airig | last post by:
I am trying to merge two xml files based on common date/time and then write out a tab-delimited xml file with the header record from one of the input files concatenated in front of the merged...
3
by: puzzlecracker | last post by:
I want to read lines and skip blank lines: would this work considering the lines can contain tabs, spaces, etc.? file.in: ------ line1 line2
1
by: Melissa | last post by:
I created a report that is grouped and I set it to go to a new page after each section. Each page will have a different number of records. I have a function that looks at the number of records and...
6
by: Melissa | last post by:
Does anyone have a generic procedure for adding blank lines to reports like Sales details, PO details and/or Orders details. The procedure would need to count the number of line items, determine...
3
by: Jeff Calico | last post by:
Hello everyone I am transforming an XML document to text, basically only outputting a small portion of it. When I run the following XSLT via Xalan's processor, I get a bunch of unwanted blank...
1
by: DAnne | last post by:
Hi, I have checked your archives but have not been able to find anything that works for my situation. I have a for loop that brings back a list of unique responses for each section in a report....
4
by: Andreas Bauer | last post by:
Hi, I have to audit some c# code. I know in the options I can adjust how the code should be formatted while entering it. But is there any way to apply afterwards a code template to the classes...
7
by: Shari Gottheim | last post by:
creating a school directory. how do i get the report views to not show blank lines?
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.