PC Review


Reply
Thread Tools Rate Thread

Re: If-Then-Else statements

 
 
Al Campagna
Guest
Posts: n/a
 
      12th Dec 2009
Barb,
Check Help for syntax assistance on the For-Else-Then statement.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If IsNull([PaymentID]) Then
[PaymentID].Visible = False
[PaymentAmt].Visible = False
[PaymentDate].Visible = False
Else
[PaymentID].Visible = True
[PaymentAmt].Visible = True
[PaymentDate].Visible = True
End If
End Sub

If you don't make Amt and Date visible again, in the Else statement,
they will never be visible again during that report printout.

--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


"BarbS via AccessMonster.com" <u36617@uwe> wrote in message
news:a07ebc3e9801f@uwe...
> I'm presently studying Access and having difficulty understanding building
> event codes. What I'm trying to do is suppress the printing of three
> controls in a report if they are Null. This is how I wrote the code, but
> it
> is not working. Can someone please help. Thank you,
>
> Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
> 'Suppress the printing of the Payment Information when the PaymentID
> control value is null'
> If IsNull([PaymentID]) Then
> [PaymentID] , [PaymentAmt], [PaymentDate].Visible = False
>
> Else: [PaymentID].Visible = True
>
> End If
> End Sub
>
> --
> Message posted via http://www.accessmonster.com
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Update Set Statements or Multiple DML Statements in one thedudeminds@msn.com Microsoft Access Queries 4 11th Sep 2007 06:34 PM
IF Statements (Mutliple Statements) =?Utf-8?B?RGVlemVs?= Microsoft Excel Worksheet Functions 3 19th Oct 2006 06:13 AM
if statements, and statements =?Utf-8?B?U3VtIExpbWl0IGFuZCBtYXJraW5n?= Microsoft Excel Worksheet Functions 3 29th Mar 2006 03:25 PM
operator statements, shorting when reusing one of the statements? KR Microsoft Excel Programming 1 4th Aug 2005 06:20 PM
IF statements/ AND Statements Suresh Nair Microsoft Excel Worksheet Functions 0 9th Aug 2003 09:19 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:09 AM.