Solved

report in Access 2003

Posted on 2011-02-11
3
301 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
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 125 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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.

808 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