Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    e51lrrp is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    53

    Report from open form

    I have a form that will be used for data entry and it has lots of fields associated with it. I would like to produce a Report, which will basically be a Customer Receipt based off of the current open form (frmNewApparelOrderDetai). I created a query with just the fields I require as the data source for the report but not sure how to just get the current order only. The way it is currently working it gives me all the orders in the tblApprelOrderDetail.

    I have only been at this for a little while and my questions may be silly but I sure could use the help.
    Thanks in advance for any ones help.
    S

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    e51lrrp is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    53
    Paul...not sure that the wherecondition is applicable because I want to only display the current information listed on the open form..in other words the data entry person would be ordering something for a customer with many variables but would want to give the customer a receipt of the order but it would only need some of the data the rest would be for the production staff. I will also be attempting to have a report for production that will be minus the money just information needed to complete the order.
    Thanks for staying with me as this project is important to my sons business. It is a very small business with only three employees but they spend so much time on paperwork and looking back for old order.
    S

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    If you're saying that your issue with the wherecondition is that you only want some of the fields, you'd control that by creating a "receipt" report that included the desired fields.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    e51lrrp is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    53
    No the issue is I only want the current orderID, the one the data entry person is working on....The current open form.
    s

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    That's what the wherecondition does; filters the form or report being opened to the specified record.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    e51lrrp is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    53
    What you gave me is way above my experience so that is why I am having problems. I will try and study it in hopes of understanding what you are trying to tell me. I have not done any coding so all of this is new and I am not sure even where to do the coding....very confused at this time. Sorry for being so dense.
    S

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    e51lrrp is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    53

    Angry

    Well your suggestions sounded good in theory but I couldn't make it work. This time I have attached my database in hope that you can tell me where I am going wrong. The frmApparelOrderDetail is where I tried to do the command button approach. Sure hope you can make heads or tails of my attempt.
    S
    Attached Files Attached Files

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    You had to replace "ControlName" with the name of yours. Try

    DoCmd.OpenReport "rptCustomerOrderReceipt", acViewPreview, , "OrderID = " & Me.OrderID
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #11
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    By the way, the prompt you get is because you can't do this:

    =[qryOrderDetailSums]![SumOfTaxes]

    I would expect to be able to sum a field in the report's source to get those.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  12. #12
    e51lrrp is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    53
    Paul....thank you thank you thank you. It works. I do have another question. When I did it it printed only. Is that what these command told it to do? Based on what I understand it was supposed to open the new report. Not sure why it printed. Any suggestions.
    Again I thank you enough for your help. From here I can make the other form perform as this one does. S

  13. #13
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    If you look at help on OpenReport, you'll see the default is to print. You probably didn't notice this in the code I posted: acViewPreview.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  14. #14
    e51lrrp is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    53
    Now you really lost me...I looked at the help under the Microsoft Visual Basis for Applications-Sylvesters Decorated Apparel and all it does is take me to the web. You said to look at help on OpenReport???? The only place I know to see this is by using a macro?
    If I am being too much trouble for you I will just live with the print feature but I like to learn all I can and understand exactly what is going on.
    Thanks
    Sharon

  15. #15
    e51lrrp is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    53
    Not sure what you were telling me in your previous message but I went on line and googled help for OpenReport Method and see the example statement you originally gave me. I think I understand a little more and that acViewNormal is to Print. It does not say how to open a report in Design view it just say that you can. Am I at least getting closer? hehehe S

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

Similar Threads

  1. Help on report to open form to open query...
    By saseymour in forum Programming
    Replies: 13
    Last Post: 07-16-2013, 08:11 AM
  2. Replies: 2
    Last Post: 05-11-2012, 11:52 AM
  3. VBA to open report from form
    By Desmondo in forum Programming
    Replies: 1
    Last Post: 04-08-2012, 11:30 PM
  4. Open Report with Form
    By TinaCa in forum Programming
    Replies: 7
    Last Post: 09-06-2011, 04:38 PM
  5. open report from a vb form
    By tracamonali in forum Reports
    Replies: 2
    Last Post: 08-10-2009, 01:55 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