Page 1 of 2 12 LastLast
Results 1 to 15 of 17

Thread: Access 2007 - Report View

  1. #1
    Join Date
    Apr 2013
    Location
    Laurel, MD
    Posts
    27

    Access 2007 - Report View

    Morning...I need some help with my report in ms access 2007. I have 2 different issues:

    1. I need to combine records in my report. For example I have 5 employees contact information but instead of having the company name listed only once with the names of all 5 employees listed under it, I have the company listed 5 times with only one employee beneath it. How do I put all names under one heading.

    2. I need to be able to add in a simple restriction to allow information like the phone, fax, email, etc. to show only if there is information there.

    Any help you can provide will be appreciated. Thanks!

  2. #2
    Join Date
    Oct 2006
    Location
    Maitland NSW Australia
    Posts
    275
    Point 1
    GROUP your records by Company Name. You will have a group header with the Company name and the employees will be listed in the details section

    Point 2.
    If there is no phone number etc. then there will be nothing displayed in the Phone number field in the details section for the employee.
    Allan

  3. #3
    Join Date
    Apr 2013
    Location
    Laurel, MD
    Posts
    27
    Good morning Allan,

    Thanks for the reply. How do I do the grouping. I have been trying to do it but nothing happens when it is done.

    For the phone, etc. I have the tag line that is displayed. The record itself stays blank if there is nothing there. So I need to get rid of the field header when nothing is there and have it displayed when there is. Thanks!

  4. #4
    Join Date
    Oct 2006
    Location
    Maitland NSW Australia
    Posts
    275
    Have look at this link http://www.functionx.com/access/Lesson25.htm. This explains how to group records.

    For your phone you will need code on the print format event to check if the field is null then set the field header visible property to FALSE if the field is not null then set the field header visible to TRUE.
    Allan

  5. #5
    Join Date
    Apr 2013
    Location
    Laurel, MD
    Posts
    27
    Thanks. That is what I thought for the phone but I was trying to find a solution around that. So is there anyway to do the phone without using the code. The people who will be using the database don't know how to program and if they have to change anything in the future, this will make it more complicated and I will not be there to help.

    Thanks for the link, I will check it out.

  6. #6
    Join Date
    Oct 2006
    Location
    Maitland NSW Australia
    Posts
    275
    I would not worry about displaying or not displaying when there is no phone, as it will be a reminder to the user that a phone number etc. is missing.
    Allan

  7. #7
    Join Date
    Apr 2013
    Location
    Laurel, MD
    Posts
    27
    I understand your point. But what I am asking is is there any way for me to hide the label of the field when it is empty without using a program to do it. I am using an if/else statement, but my client has no programming experience.

  8. #8
    Join Date
    Oct 2006
    Location
    Maitland NSW Australia
    Posts
    275
    Using an IF.... ELSE... ENDIF should work. You just need a lit bit of IF ELSE END IF code. If you are still having trouble post your database with the relevant data table(s), queries and report etc. and I will have a look. Please for security purposes do not use actual data use test data for testing.
    Allan

  9. #9
    Join Date
    Apr 2013
    Location
    Laurel, MD
    Posts
    27
    Ok. Let me work on it and I will let you know how it went. Thanks!

  10. #10
    Join Date
    Apr 2013
    Location
    Laurel, MD
    Posts
    27
    I was able to do it on the print view, but how do I remove it from the datasheet view as well.
    The code I used is as follow:

    If IsNull(Me.[Employee_Email]) Then
    Me.Label1.Visible = False
    Else
    Me.Label1.Visible = True
    End If
    Last edited by ishatoo; 04-10-2013 at 10:26 AM.

  11. #11
    Join Date
    Apr 2013
    Location
    Laurel, MD
    Posts
    27
    Hi Allan,

    Can I email you the database? Won't let me do an attachment.

  12. #12
    Join Date
    Oct 2006
    Location
    Maitland NSW Australia
    Posts
    275
    If you want to post it to the forum you will need to Zip the file. Also you can email (zipped copy) it to my gmail address see below.
    Allan

  13. #13
    Join Date
    Apr 2013
    Location
    Laurel, MD
    Posts
    27
    I have zipped the files. But it is too big even then. I will email it to you when I get yo work in a couple of hours or so. Thanks.

  14. #14
    Join Date
    Apr 2013
    Location
    Laurel, MD
    Posts
    27
    Good morning Allan,

    I was able to zip the database. Was trying to do a screen shot of the report and that wasn't working when it is zipped. As you will see when you go to the report view my field labels are showing there but not when it is printed. The print out looks fine. So, is it normal for the field labels to show on the report view.
    Attached Files Attached Files

  15. #15
    Join Date
    Oct 2006
    Location
    Maitland NSW Australia
    Posts
    275
    Ishatoo

    Your zipped file is blank, have you zipped the correct file? There is no data, reports etc.
    Allan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •