Solved

report in Access 2003

Posted on 2011-02-11
7
328 Views
Last Modified: 2013-11-28
Is it possible in a report in Access 2003 to have the following condition between 2 controls: 1st control is visible if the 2nd control is not null or empty and 1st control is not visible if the 2nd control is null or empty?
Thank you
0
Comment
Question by:marian68
  • 5
7 Comments
 
LVL 31

Accepted Solution

by:
Helen_Feddema earned 125 total points
ID: 34872780
This code should do it:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

   If Nz(Me![Second] <> "" Then
      Me![txtFirst].Visible = True
   Else
      Me![txtFirst].Visible = False
   End If
      
End Sub

Open in new window

0
 

Author Comment

by:marian68
ID: 34872919
Thank you Helen
Where do I have to put this code in my report?
Thank you
0
 

Author Comment

by:marian68
ID: 34873084
In the meantime I found the place for the code.
Please tell me if I add another field what would be the code:
1st control is visible if the 2nd control or the 3rd control is not null or empty and 1st control is not visible if the 2nd control and the 3rd control is null or empty?
Thanks a lot
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:marian68
ID: 34873181
  If Nz(Me![COMMENTS] <> "" Then
I am receiving a syntax error for this line.
Thank you
0
 

Author Comment

by:marian68
ID: 34873339
I found the syntax error.
Please tell me if I add another field what would be the code:
1st control is visible if the 2nd control or the 3rd control is not null or empty and 1st control is not visible if the 2nd control and the 3rd control is null or empty?
Thanks a lot
0
 

Author Comment

by:marian68
ID: 34874114
Anyone there!
Thank you
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 125 total points
ID: 34897568
<Points to Helen if this is what you need>
(Just trying to help out)
;-)

If Nz(Me![Second]) <> ""  Or Nz(Me![Third])<> "" Then
      Me![txtFirst].Visible = True
   Else
      Me![txtFirst].Visible = False
   End If


JeffCoachman
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now