?
Solved

report in Access 2003

Posted on 2011-02-11
3
Medium Priority
?
304 Views
Last Modified: 2013-11-28
Is it possible in a report in Access 2003 to have the following condition between 3 controls:
1st control is visible if the 2nd control or the 3rd control are not null or empty and 1st control is not visible if the 2nd control and the 3rd control are null or empty?
Thanks a lot
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
  • 2
3 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 34874914
You can likely use the Format or Print event of the section hosting those controls (i.e. the Details section, for example), and do something like this:

Me.Control1.Visible = Nz(Me.Control2, 0) <>0 OR Nz(Me.Control3,0) <>)

0
 
LVL 31

Assisted Solution

by:Helen Feddema
Helen Feddema earned 500 total points
ID: 34874991
I think I already answered a similar question.  Here is the code with another condition for the 3rd control:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

   If Nz(Me![LastName]) <> "" Or Nz(Me![FirstName]) <> "" Then
      Me![txtSSN].Visible = True
   ElseIf Nz(Me![LastName]) = "" And Nz(Me![FirstName]) = "" Then
      Me![txtSSN].Visible = False
   End If
      
End Sub

Open in new window

0
 
LVL 31

Expert Comment

by:Helen Feddema
ID: 34874999
Note that this works in Print Preview, but not in Report view.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

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