Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access 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 July 21st, 2005, 10:55 AM
Registered User
 
Join Date: Feb 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Setting visible property on a report field

I would like to set a report field to visible or not depending on another field in the detail layout. I'm not sure of the syntax of the VB code. Here is what I have now and it's not working. I'm doing this on the OnPrint event of the detail.

IIf (Me!txtPrevInv Is Null), (Me!txtShipPer.Visible = False), (Me!txtShipPer.Visible = True)

Any help would be great!!

Thanx - tnzabo

 
Old July 21st, 2005, 11:14 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

Try this:

IIf (isnull(Me!txtPrevInv), (Me!txtShipPer.Visible = False), (Me!txtShipPer.Visible = True)

Kevin


dartcoach
 
Old July 21st, 2005, 11:28 AM
Registered User
 
Join Date: Feb 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You are kidding me! It worked beautifully - syntax is so picky. Just by moving the is null. Great! Thanks so much!

nikkiz

 
Old July 21st, 2005, 11:30 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

No problem.
Thanks for posting that you got it resolved.

Kevin

dartcoach





Similar Threads
Thread Thread Starter Forum Replies Last Post
Button does not retain visible property mhshpk ASP.NET 2.0 Professional 2 July 18th, 2007 11:24 AM
Word.ApplicationClass Visible Property danielv General .NET 0 January 11th, 2006 12:50 PM
Visible row property Louisa VB.NET 2002/2003 Basics 0 October 29th, 2004 04:26 AM
Visible property glitch bmains VS.NET 2002/2003 3 May 5th, 2004 02:36 PM
Visible property of controls in data list acko ASP.NET 1.x and 2.0 Application Design 1 December 9th, 2003 10:41 AM





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