Results 1 to 7 of 7
  1. #1
    Sethrutan is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2014
    Posts
    2

    Question Can anyone help me find a way to assign specific locations to sorted record?

    This question is a bit involved, and I have to be somewhat vague due to the sensitive nature of the parts that we make, but here is the general idea:



    There are 25 parts which have unique serial numbers and performance data. These parts are all going to be installed into one large system, in order for the system to perform correctly the parts have to be installed in certain locations. I can sort the performance data using 3 different queries to get them lined up, with one query telling me what the serial number for, say, 5 and 9 should go, the second query telling me where 24 should go, and the third query telling me the rest. The problem that I have, is getting that information into a report or a form. In excel (where I am currently doing this), we used macros that sorted everything, then just referenced specific cells to place the serial numbers in position order, but I have not been able to figure out how to do that in access.

    I know that this description is somewhat vague, but I really need some help.

    Thanks!

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Welcome to the forum

    Yes, really, really vague. Almost opaque... as in not clear at all.

    Without a table structure, the SQL of a query, maybe some sample data, I don't see a way to help.


    The object names (fields, tables, queries) don't have to be the real names and data can be fake. But there has to be something.....

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Agree with Steve. Without more info about data structure and relationships, cannot give specific advice.

    If a single query as report RecordSource cannot serve, perhaps subreports are needed.

    Regardless, I expect you need to use report Sorting & Grouping features.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    Sethrutan is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2014
    Posts
    2
    Ok, this is what I am trying to accomplish. Bear in mind the numbers and everything are all made up, but if you work from left to right you should get the general idea. The output should list the Positions in order, and then the serial number of the part that should go into it. Does that help?


    Part Performance data Position
    1 110 35 66 -35 56 L A
    2 120 25 60 -25 44 J B
    3 150 5 56 5 32 C
    4 113 32 45 -32 23 D
    5 117 28 44 -28 23 E
    6 201 56 35 56 21 F
    7 79 66 34 20 G
    8 85 60 32 19 H 7
    9 111 34 32 -34 11 I
    10 116 29 29 -29 11 J
    11 119 26 28 -26 5 K
    12 137 8 26 -8 -8 L
    13 166 21 25 21 -10 M 2
    14 135 10 23 -10 -10 N
    15 100 45 23 -45 -12 O
    16 156 11 21 11 -25 P
    17 168 23 20 23 -26 Q
    18 177 32 19 32 -28 R
    19 189 44 12 44 -29 S
    20 165 20 11 20 -32 T
    21 156 11 11 11 -34 U
    22 168 23 10 23 -35 I V
    23 164 19 10 19 -45 K W
    24 133 12 8 -12 X
    25 135 10 5 -10 Y 25
    25 always goes to Y Absolute value of performance data minus nominal value Sorted. Two largest variations from nominal assigned to specific points. (H, M) performance value minus nominal sorted, remaining values are assigned on alternating basis. ect..

  5. #5
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Nope, that didn't help me. Can't tell the relationships or which column is the serial number, etc.

    Re-reading your first post, the only thing I can suggest is to create a table, name it something like "tmpRptData" with the fields you need and use the 3 queries you have now to populate the table - Append using the first query. Then use VBA to open record sets for the 2 & 3 queries and update the records.
    Then use a query based on the "tmpRptData" table for the report/form.

    You have a tough problem.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Weirdest data manipulation I've ever seen. Totally nonsensical to me. Okay, "25 always goes to Y" is a fairly clear rule but why Y? What happens if you expand to 30 parts?

    Maybe you better stick with Excel to get the order. Access can link to spreadsheet and build a report using the linked sheet as RecordSource.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    As Steve and June7 have mentioned, you are going to have to devise a clearer explanation/description/example so that readers understand WHAT you are trying to do.
    We/I have no idea what
    list the Positions in order, and then the serial number of the part that should go into it
    means.

    What would you tell someone who doesn't know you; who doesn't know your set up; who doesn't know Access nor Excel, What you are trying to do?
    Plain, simple English???

    An additional thought seeing as you are using Excel currently:

    Could you have an array with 2 dimensions, 1) is position and 2) serial number?
    You still need appropriate logic to identify the positions, and the associated serial number.
    Perhaps just a list in an array is easier to understand than a bunch of numbers on a page (as per your post #4).
    Just a thought for consideration.

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

Similar Threads

  1. Find specific record in subreport
    By hpHHI in forum Reports
    Replies: 1
    Last Post: 05-24-2013, 03:14 AM
  2. Trying to find a specific Record using VBA
    By FormerJarHead in forum Programming
    Replies: 26
    Last Post: 11-12-2012, 07:11 PM
  3. How to assign a specific value to each record within a query
    By Access2007_NewUser in forum Access
    Replies: 1
    Last Post: 04-22-2012, 08:28 PM
  4. Replies: 0
    Last Post: 01-26-2011, 05:51 PM
  5. Replies: 0
    Last Post: 07-19-2009, 12:19 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