Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

report in Access 2003

Posted on 2011-02-11
7
Medium Priority
?
336 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
7 Comments
 
LVL 31

Accepted Solution

by:
Helen Feddema earned 500 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

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 500 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
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…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

636 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