Results 1 to 8 of 8
  1. #1
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376

    Need to sort by an Added Field but don't see it available

    Hello all,



    I created a report and that is working fine, I then added a field (txtStatus) that compares two other fields and inserts either "OK" or "Order". I want to now sort the report by the added field "txtStatus" but when I try to "Sort by the Select Field", the "txtStatus" doesn't appear.

    What am I missing?

    Thanks
    Dave

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Moving that expression to the report's source query is probably easiest. Then it's a field you can sort on.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376
    pbaldy,

    I thought about that and did that, but it still doesn't appear.

    Thanks
    Dave

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Really? Make sure the Show box is checked in design view. Can you attach the db here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376
    pbaldy,

    The file is attached, Open the "Forecast Build Requirements" form, select or type in "m22281" in the combo box, select "5" for the build quantity and the report will open.

    I want to sort on the "Status" field so that parts that are designated as "Order" appear at the top of the report.

    Daves MRP- 9-10-18 - In Use.zip

    Thanks

    Dave

  6. #6
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I don't see the calculated field in the query? I added this to the query:

    SortField: IIf([Forms]![Forecast Build Requirements]![txtBuildQty]*[Qty]<[QtyOnHand],"OK","Order")

    and sorted on that.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376
    pbaldy,

    I was using the Status:Comments Field from tblPartMain, in the "Attempt at Query-2 Working?" query, then added the "=IIf([BuildQty]<[QtyOnHand],"OK","Order")" as the control source to the text box in the report.

    Where did you add the Sort Field?

    Thanks

    Dave

  8. #8
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    To the query. That makes it a field you can add in sorting and grouping.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 4
    Last Post: 03-17-2016, 12:42 PM
  2. Replies: 4
    Last Post: 02-03-2016, 09:23 PM
  3. Sort records by date added
    By gmaster in forum Programming
    Replies: 8
    Last Post: 06-12-2014, 01:21 AM
  4. Report won't show added field
    By Jojojo in forum Reports
    Replies: 0
    Last Post: 11-12-2011, 01:14 PM
  5. addressing a field that is not added to the form
    By Autoclave in forum Programming
    Replies: 5
    Last Post: 10-29-2011, 05:52 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