Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Join Date
    Dec 2005
    Posts
    22

    Access Reports

    Quick stupid question... How can I get one record per page report in Microsoft Access?

    Thanks
    --Mike

  2. #2
    Join Date
    Dec 2005
    Location
    Wilmington, DE - USA
    Posts
    275
    For each section in your report, you can specify for Access to force a page break before or after the section. SO, in your case, set the page break to occur after each detail record.

  3. #3
    Join Date
    Dec 2005
    Posts
    22
    Another quicky: Maybe I should've asked this first but I don't know...

    I want to do the force page break like you said if (adn only if) I can set it up so that in a form I can put a "print" button so that it goes to a report and then on the report have another print button that prints ONLY that page. Any way? Or is there another route?

    Thanks! SOrry for the confusion (if any)

  4. #4
    Join Date
    Dec 2005
    Location
    Wilmington, DE - USA
    Posts
    275
    There is not a way to put a command button on a report.

    It is possible to do things like the following:

    1) Use a form to launch the report, have a checkbox or some other control on the form to indicate whether you want a page break after each detail record, and then use code to toggle the setting

    2) Use a form to launch the report, and have controls on the form to set certain selection criteria for the report (I would then use code to update the report's recordsource property in the OnOpen event of the report)

  5. #5
    Join Date
    Dec 2005
    Posts
    22
    I think your number 2 solution was the closest to my idea. I'll try to explain one more time and then go attempt at what you said and see if I can figure something out.


    Here's how the database should work:
    The owner of the database goes into a form. They fill out the information for a new record. Once that is complete, they need to print that information. How they should go about doing this, I don't know. I figured that hitting a button on the form after the information was inputted could trigger it so that they can print this information.

    I tried printing out just a form but it kept screwing up the layout of the page and I believe it was you or someone else who told me that forms aren't meant for printing anyway.

    ABOUT the Database:
    It is basically a receipt. The owner types the information of the user into the form (just name and phone number) and then goes down to type in the services that had been accomplished and the price. The total price is then updated with the appropriate tax and then the owner must print out this receipt.


    I believe that's clear enough, if not please let me know. If you have any ideas that I'm not seeing then I'd greatly appreciate the help. The only requirement is that it must be extremely (or near-extremely) simple for the owner to use.


    Thanks so much... I almost was afraid you had given up on me and there's no where else online that I can really find much help :P

    --Mike

  6. #6
    Join Date
    Dec 2005
    Location
    Wilmington, DE - USA
    Posts
    275
    Quote Originally Posted by Mxcsquared
    Thanks so much... I almost was afraid you had given up on me and there's no where else online that I can really find much help :P
    Well, it was Christmas-time after all :wink:

    What you described is actually pretty easy to do. If you only want it done for new records, then you need code for the form's AfterInsert event; if for changed data or new records, then you need to use the AfterUpdate event (which fires for both updated and new records).

    I am assuming that your form has a textbox for a unique identifier (even if it is locked or invisible).

    I just made a test app where I had a form that had the following code:

    Code:
    Private Sub Form_AfterUpdate()
    
        Dim DoPrint As Long
        
        DoPrint = MsgBox("Do you want to make a receipt?", vbYesNo)
        
        If DoPrint <> vbYes Then Exit Sub
        
        DoCmd.OpenReport "BasisForChart1", acViewPreview
        
    End Sub
    In the report definition for BasisForChart1, I had the following in the Filter property for the Form:

    [Dept]=Forms!BasisForChart!Dept

    And of course, Filter On=Yes.

    Now, that was a pretty simplistic example. You might need to tweak it a bit for your particular app, but that should give you a nice start.

  7. #7
    Join Date
    Dec 2005
    Posts
    22
    Hey! That looks like it's getting better

    The only problem is I have a subform in there that has all the Services Performed (so that there can be a custom amount) And when I try to go to change those, it pops up with that box that you had me put in. Would it be wise to put that message box in the subform or is there a different way?

    -----------

    Edit... I tried the ^^ and here's how that subform is set up:

    Service Performed Price
    ____________________ _______
    |___________________| |______|
    |___________________| |______|

    After I tab and attempt to go to another "Service" it pops up with that message box. *sigh* I don't know exactly but I think it really would be easier to push a button but if this is the best way then maybe... But this can get rather confusing for the owner of the database.

    ---------

    Edit2: Okay, i did end up creating a button just to see how it would react and everything seems okay. The only thing I'm confused on is the filter... Can you enlighten me a little more on that? I think that if I get that down I'll be good to go!

    To explain the filter.. I put it in the report and changed it to my specifications. So now it says:
    [ID]=Forms!Invoice!ID

    I have ID as the uniqueness of each receipt and was hoping that when I hit the button in the form that it would just filter out everything that had the id of the current record. The only problem is, it still asks me what the ID should be. Is that essential or is there a way around it? Or did I completely misunderstand?

    Thanks a lot! And yea, you're right, didn't even think about Christmas :-P

    --Mike

  8. #8
    Join Date
    Dec 2005
    Location
    Wilmington, DE - USA
    Posts
    275
    Mike,

    To be honest, I had thought to myself "hmm, this will be harder if Mike has a subform", but then I suppressed the thought

    I do still think that this will not be terribly hard to pull off. It would be nice, though, to have a copy of your db to work from. That way, I can stop talking in general terms and cut right to the chase, as it were.

  9. #9
    Join Date
    Dec 2005
    Posts
    22
    That's alright with me... You can find the Database at the following address.
    http://216.203.126.38/db

    Email me any changes at reevesm89@gmail.com ... Basically I really want it to just be a button but I need a filter that will automatically get the ID from the form to the ID of the report.


    Note: I don't have the Report (and form for that matter) looking very good layout-wise. I usually wait until the very end before I clean all that up so please just ignore that.

    Also: There are three different reports b/c I had been testing on how this thing could end up working. The one called "Invoice" is the one I'm currently testing with.


    Thanks!

  10. #10
    Join Date
    Dec 2005
    Location
    Wilmington, DE - USA
    Posts
    275
    Mike,

    I am not able to get the file. Please check to make sure it's set up right (I am getting the "page not found" response in IE).

  11. #11
    Join Date
    Dec 2005
    Posts
    22
    That's funny, it should be... Try adding "Pierce Brothers.mdb" at the end

    Apache is up and running and I have yet to have a problem with this...
    If that doesn't work is there any other way you'd like me to give it to you?

  12. #12
    Join Date
    Dec 2005
    Location
    Wilmington, DE - USA
    Posts
    275
    Still not working. My email address is in my profile. Just be sure to zip before sending it.

  13. #13
    Join Date
    Dec 2005
    Posts
    22
    Tried sending it earlier but it said that your mail domain will not accept zip files. Any other ideas? I'll go look for a free FTP site here in a bit.

    Found out what the above link didn't work

    http://216.203.126.38/db/

    Try that...

  14. #14
    Join Date
    Dec 2005
    Location
    Wilmington, DE - USA
    Posts
    275
    OK, I have it now, and in about 10 minutes got something working. Please see:

    www.geocities.com/matthewspatrick/pierce.zip

    I added a new button to your form, Invoice, which when clicked launches a report (rptInvoices) that shows the data for the current invoice only. (The report launched by itself would show all invoices; my use of the OpenReport method applies a where condition to restrict things to the current invoice.)

    BTW, you will be better off if instead of using the field name ID all the time you instead use names like InvoiceID (or OrderID), ServiceDetailID, etc. You should also try to keep spaces out of the names of database objects.

  15. #15
    Join Date
    Dec 2005
    Posts
    22
    Sounds great! Only one problem... that link doesn't work :P

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

Similar Threads

  1. Creating Watermark in Access Reports / Forms
    By Alex Motilal in forum Reports
    Replies: 0
    Last Post: 11-21-2008, 07:11 AM
  2. Formating a control in MS Access Reports
    By Alex Motilal in forum Access
    Replies: 3
    Last Post: 11-15-2008, 09:09 PM
  3. Export Access reports/query results to Outlook Calendar/Task
    By kfinpgh in forum Import/Export Data
    Replies: 0
    Last Post: 02-22-2007, 01:09 PM
  4. Need Help on reports
    By MeehPhill in forum Reports
    Replies: 3
    Last Post: 07-31-2006, 11:51 AM

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