[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

report in Access 2003

Posted on 2011-02-11
3
Medium Priority
?
305 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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 …

650 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