473,386 Members | 1,779 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,386 software developers and data experts.

Making "0" lines disappear from an invoice report

Hi Everybody,

Firstly thank you for all the help this site has given me over the past year in getting my database to hum, its been awesome.

I'm currently building an itemised invoice report to send to clients, and having a hitch with presentation. At the moment its a collection of individual text boxes showing the number of adults, children, weeks and extra days a family has stayed in a house.

Sometimes 2 people with no children may stay for two weeks and no extra days, when I run the report it will show 2 adults, 0 children, 2 weeks and 0 days.

Is it possible in Access to program one text box, with adults, children, weeks and days on seperate lines of the report, and, if it is 0 children and 0 days, for those lines to disappear completely and for the lines below it to move up.

Cheers in advance

Eddie
Nov 21 '08 #1
6 1675
puppydogbuddy
1,923 Expert 1GB
The easiest way to fix is to add the following constraint to the criteria row of the invoice amount column of the query that is the record source for the report.


<> 0
Nov 21 '08 #2
Thank you,

I tried the <>0 in the criteria section of my query, but it will not include invoices that have 0 extra days or 0 kids etc. These invoices will still need to be reported even though there are 0 extra days, 0 kids...

So much for the easy fix, and now for the hard?

Cheers Eddie
Nov 21 '08 #3
DonRayner
489 Expert 256MB
Hi Everybody,

Firstly thank you for all the help this site has given me over the past year in getting my database to hum, its been awesome.

I'm currently building an itemised invoice report to send to clients, and having a hitch with presentation. At the moment its a collection of individual text boxes showing the number of adults, children, weeks and extra days a family has stayed in a house.

Sometimes 2 people with no children may stay for two weeks and no extra days, when I run the report it will show 2 adults, 0 children, 2 weeks and 0 days.

Is it possible in Access to program one text box, with adults, children, weeks and days on seperate lines of the report, and, if it is 0 children and 0 days, for those lines to disappear completely and for the lines below it to move up.

Cheers in advance

Eddie
You could use an unbound text field to present your data and use something like the formula below as it's data source. Set the height of the field for a single line and set it's "Can Grow" properties to yes.


Expand|Select|Wrap|Line Numbers
  1. = ([NumAdults] & " adults") & vbcrlf & _
  2. (IIf (IsNull([NumChildren]),Null,[NumChildren] & " Children")) & vbcrlf & _
  3. ([NumWeeks] & " weeks") & vbcrlf & _
  4. ([IIf(IsNull([NumDays]),Null,[NumDays] & " Days"))
  5.  
Nov 21 '08 #4
puppydogbuddy
1,923 Expert 1GB
Thank you,

I tried the <>0 in the criteria section of my query, but it will not include invoices that have 0 extra days or 0 kids etc. These invoices will still need to be reported even though there are 0 extra days, 0 kids...

So much for the easy fix, and now for the hard?

Cheers Eddie
If you have separate columns in your query for "extra days" and "kids", try putting the <> 0 constraint in the same criteria row for each of those columns instead of the invoice column and see what happens.
Nov 21 '08 #5
Thank you Don and Puppy,

Although I've never written VB before I think the vbCrLF is going to be the way to go. Thank you so much for pointing me in the right direction.

Cheers Eddie
Nov 21 '08 #6
DonRayner
489 Expert 256MB
Thank you Don and Puppy,

Although I've never written VB before I think the vbCrLF is going to be the way to go. Thank you so much for pointing me in the right direction.

Cheers Eddie
Glad I could be of some help Eddie.

Don
Nov 21 '08 #7

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

Similar topics

6
by: Sandman | last post by:
I want to do this: function square ($a){ print "-- $a --"; } And use it like this: <? square( ?> Hello! <? ) ?> And get this:
1
by: Steve Juranich | last post by:
First of all, just let me say that I'm aware of the "-v" switch for Python, and I don't want anything nearly that verbose. I often long for the following behavior from Python when I'm running...
4
by: JvdWal | last post by:
Hi, I've been trying the PDF & Mail Class Library from ACG Soft in combination with Northwind-2k3 style of db. Can someone help me with the error which is popping up: (which I cant get solved..)...
0
by: Bad_Kid | last post by:
I would try to do something like that (nothing complicate). Just -> where to start? any good link? ;-))
0
by: BobAchgill | last post by:
I stumbled across a way to make buttons transparent. Which means its possible to use a button to be a "hot spot" (if a square hot spot is what you need) I found the answer waiting in a very...
5
by: rgsw | last post by:
Hi - When people view a report in access they alway make report bigger for easier viewing. When closing report sometimes they click out of access instead of making report smaller and clicking out...
2
Ali Rizwan
by: Ali Rizwan | last post by:
Hello everyone I want to make report for a specific record instead of whole record how can i do this.
0
by: faisalmushtaq | last post by:
Hello to all brains, i am relativly new to this programming world and i need tons of favor from u guys.My problem i want to use a dataset's table as my report source.Report also takes some other...
3
by: muddasirmunir | last post by:
i am using vb6 and crystal report 10 i want to ask solution of one proble which i am facing in making report. first , in my programe i ask the user to give paramerter (range) of the data...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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.