If/Then statement (?)

kathmlavery

New member
Local time
Today, 11:37
Joined
Jan 22, 2015
Messages
4
I am creating a report for membership. In the detail section I show each listing with the type of membership it is. Ex: Firm, Employee, Branch, Satellite.

The Branch and Satellite have a different mailing and physical address from the Firm or Employee.

Is there a way to set it up so that the report only shows the mailing and physical address if the type is a Branch or Satellite so I don't have a blank space under the Employees names?
 
Are you trying to hide the detail section of a report based on a data value in that report?
If so, handle the Format event of the section you want to hide and set its .Visible property. Consider code like...
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
   Me.Detail.Visible = Me.Membership = "Branch" OR Me.Membership = "Satellite"
End Sub
See what is going on there?
 
Yes.

If you look at the image you can see where the first individual has a line for mailing and physical address and they are blank.

The next two lines are "Branches" and they need to have a mailing and physical address.

I am trying to suppress the mailing and physical addresses unless the TYPE is listed as Branch or Satellite.

(Sorry would not let me post the image - ugh)
 
You can also hide controls, or resize them, using code similar to what I posted previously.

You might also want to check out the CanShrink and CanGrow properties of various controls and report sections. Setting these properties to True causes controls and sections to automatically resize in height to fit their contents.
 

Users who are viewing this thread

Back
Top Bottom