Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 10th, 2003, 09:20 AM
Registered User
 
Join Date: Dec 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default hide some unwanted data in report

Hi

I have made a report in access 2000 based on query. Query contains some numeric fields having default value 0. This report has shown in print preview format after filling form and by clicking required button. This form has got those fields and for calculation I put defult value of those is 0. If somebody enters no data on that particular field and clicks preview button he shows that particular field having 0 value.It is redundant. It should be eliminated from the report part and also from the printing part.

How can this be possible ?
Pl let me know asap.

regards
Subho

 
Old December 10th, 2003, 04:07 PM
Authorized User
 
Join Date: Nov 2003
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default

An easy trick is to use conditional formatting and set the forecolor to the background color so that the 0 is printed or shown in white.
Otherwise you have to use vba and set the ControlSource to an empty string for the relevant textboxes. I usually use the formatting method, its easier:)
 
Old December 11th, 2003, 03:45 AM
Registered User
 
Join Date: Dec 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks a lot edcaru for earliest reply.

But this can't solve the problem. Because value of field is not predefined and report shows this very particular value. If somebody omit then report will show 0 value as it is the default value for this.


regards

Subho

 
Old December 11th, 2003, 06:45 AM
Authorized User
 
Join Date: Jul 2003
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I usually use VBA in the Report code to test for the invalid 0 and thenset the control .visible prporty to False.


Cheers Ray
 
Old December 12th, 2003, 12:33 AM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is the field keeping the 0 or do you mean that there is no value?
If there is an actual 0 inserted as the value, you can use conditional formatting.

Something does not add up.



Sal
 
Old December 12th, 2003, 02:31 AM
Registered User
 
Join Date: Dec 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This field really contains 0 (in numeric) value by default and this settings is required for calculation. How can I stop to view this 0 in report part ? How this problem can be solved by conditional formatting ?

Pl secify with example.

thanks
Subho

 
Old December 12th, 2003, 03:11 AM
Registered User
 
Join Date: Dec 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks to everybody and P2P.Wrox.Com Forum.

At last I have solved the problem accroding to ur advice.

thanks to all of u

Subho






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to filter out unwanted data fdtoo SQL Server 2000 1 April 25th, 2006 10:44 AM
Hide 0 value in a Report Asif2005 Classic ASP Basics 1 March 7th, 2005 06:21 PM
Hide Field ToolTip From Report MCSD Crystal Reports 0 January 24th, 2005 07:17 AM
Conditional Hide Report Page Header SGL Access VBA 0 August 30th, 2004 02:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.