Solved

report in Access 2003

Posted on 2011-02-11
7
330 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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…

770 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