Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164

    Question on Reporting

    I currently have a form where I select an employee and it brings up the proper detial on that employee. I also have a report that will list all employees along with their detail. I would like to put a command button on the form that when clicked will print the report with the selected employees detail only.



    Can this easily be done or do I need to know VBA code to write and event that will do this?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,923
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  3. #3
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    RG,

    I know that "RptSomeReport" shold be replaced with the name of my report. Hower, I am unclear as to what the "RunID represents?

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,923
    Are you using a SubForm to display the detail for each employee? If so, what is the LinkChildField property of the SubFormControl set to?
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  5. #5
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    yes, I am using a subform. The LinkChildField property is set to "EmployeeLkp"

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,923
    You now have the answer to your Post #3.
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  7. #7
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    I am sorry RG, I am not getting it to work. I think it may have something to do with the relationships that I have to each of the tables. If I am understanding you right I am to use EmployeeLkp in place if RunID. I am not sure if I am to use it in place of both occurances or if one of the occurances should be replaced with the field linked to in the master field which is just ID

    ChildLinkId=EmployeeLkp
    MasterLinkId=ID


    strWhere = "[RunID]=" & me!RunID

  8. #8
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    RG, I figured out why it was not working. I did not have the linked fields in my report.
    Thanks again for the help.

    James

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,923
    That's great James. I'll bet you learned a few other things about Access in the process too.
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  10. #10
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    RG, thanks to you guys I am learning a lot. I really appreciate what you are doing?

  11. #11
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    RG,

    Now that I have found how to get this to work using my test db, I am now trying to apply it to my live db. The form w/subform is tied to a query. This query is lacking the PK that I need to get this to print recored button to work. When I try and modify the query I get an error referring to an invalid bracket. Any change to the query gives me the same results. Would you mind looking at it if i provide you with me db?

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,923
    I have some time. Go ahead and Compact and Repair and then ZIP up the db and post it.
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  13. #13
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    RG, I am sorry but I thought I knew how to upload the file but i was wrong Where do I go to upload the file. There are links here on this page for "inserting a link" and "inserting an image" but I do not see one for a file?

  14. #14
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,923
    Go to Advanced and scroll down to Manage Attachments.
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  15. #15
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    Thanks, I did not see that advance button before. (FYI you will need to hold down SHIFT while opeing the DB) The query is called "PAYMENTS SUM WITH BALANCES" you will notice that when you try and run the query it will prompt you for a "dvancesTbl.EmployeeLkp" value.

    This is because I changed the name of the field in the table AdvancesTble from EmployeeLkp to Emp_ID because I took the lookup script off at the table level so that this table would hold the employee ID number instead of their name.

    I am trying to modify the sql script in the query "PAYMENTS SUM WITH BALANCES" to change the field name from EmployeeLkp to EMP_ID. It just does not allow me to change it without erroring out and I do not know why.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Dynamic reporting
    By pushpm in forum Programming
    Replies: 0
    Last Post: 04-22-2009, 12:45 PM
  2. Rookie needs help with basic reporting
    By James Rousselle in forum Reports
    Replies: 0
    Last Post: 03-01-2007, 02:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums