Solved

report in Access 2003

Posted on 2011-02-11
3
298 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
  • 2
3 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 125 total points
Comment Utility
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 125 total points
Comment Utility
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
Comment Utility
Note that this works in Print Preview, but not in Report view.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

728 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

15 Experts available now in Live!

Get 1:1 Help Now