Results 1 to 4 of 4
  1. #1
    chriscardwell06 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2013
    Posts
    6

    Exclamation Trying to calculate percentage on Form and display on report


    We have a form that Engineering fills for jobs by sales order. The form is basically a bill of materials. I have calculated the percent of the job completed on the form and it does it beautifully for the form side of things. Where it gets tricky is we have a report that only shows the top line item for each sales order. We separate them by item number ie 1.00, 1.01, 1.02. Only the .00 items show on the report. I had hoped I could put in a column and set it's control to the percentage box on the form and it calculate it in the background but that was just wishful thinking. I don't care how I calculate it but I can't show the items on the report that aren't a .00. If I could this would be cake to do. Any ideas on a way of getting around this. I am still learning and consider myself a novice so be gentle lol. I have attached screen shots of the report and form.

    Click image for larger version. 

Name:	Engineering Sales Order Form.jpg 
Views:	12 
Size:	235.2 KB 
ID:	14711Click image for larger version. 

Name:	Active Engineering Report.jpg 
Views:	12 
Size:	294.7 KB 
ID:	14712

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Do you want the percentage to appear like it is on your form or do you want it like a 'running sum'. it seems like you'd be ok with a simple, single, percentage at the end of your report. If so you could use a domain function to achieve that

    for instance:

    dcount("*", "[TableName]", "[FieldName] = " & <numberfield> & " AND [Status] <> " & statusexception)/dcount("*", "[Tablename]", "[FieldName] = " & <numberfield>)

    So let's say your table name is tblSCHEDULE, it has two fields the PK field is SO#, the ORDER_STATUS for ENGINEERING is 1 you want to count all the records that are NOT engineering and divide it by the total records for that 'job'

    So let's say the job is the item in your SO# field (2315701)

    Assuming both SO# and STATUS are number fields your statement would be:

    dcount("*", "[tblSchedule]", "[SO#] = " & [Enter the Order Number] & " AND [Order_Status] <> 1)/dcount("*", "[tblSchedule]", "[SO#] = " & [Enter the Order Number])

    if one of those fields is a text value you'd have to put in ' marks to indicate a text string like:

    dcount("*", "[tblSchedule]", "[SO#] = '" & [Enter the Order Number] & "' AND [Order_Status] <> 1)/dcount("*", "[tblSchedule]", "[SO#] = '" & [Enter the Order Number] & "'")

  3. #3
    chriscardwell06 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2013
    Posts
    6
    I need it to appear with each line item. For the one that is assigned to "Chris" I know it has a 93% completion overall but I need it to count the lines that aren't displayed on the active engineering and I don't know that I can do that. I have done the main form count and calculate the percentage. I need it as a running number for each line but like I say...taking into account the lines that aren't displayed.

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    You said there's only one line appearing per 'job' and that's the way you want it. (or did I misread it) if that's the case the formula I gave you will work on the detail line. It's the same calculation, just performed a different way.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 07-26-2013, 06:59 AM
  2. Replies: 5
    Last Post: 12-17-2010, 11:06 AM
  3. How to calculate a percentage on form
    By jrockusa in forum Forms
    Replies: 1
    Last Post: 03-31-2010, 01:53 PM
  4. Use report to Calculate sum and percentage
    By bangemd in forum Reports
    Replies: 3
    Last Post: 05-28-2009, 12:01 PM
  5. Replies: 0
    Last Post: 08-07-2008, 07:02 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