473,465 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Need Blank Lines in Report

6 New Member
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, 63 views)
Apr 14 '14 #1
8 1375
Rabbit
12,516 Recognized Expert Moderator MVP
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
shyjukj
6 New Member
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 Recognized Expert Moderator Expert
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
shyjukj
6 New Member
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 Recognized Expert Moderator Expert
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
shyjukj
6 New Member
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 Recognized Expert Moderator Expert
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
shyjukj
6 New Member
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?
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.