Results 1 to 7 of 7
  1. #1
    Megood is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    17

    Question Query with simple numbering.


    This is my first post and after searching all over I still haven't found the answer that fits my problem. And quite frankly I found some harsh responses to questions that resembled mine, so please go easy.

    I have a table that contains two correlating figures. I created a query that pulls the information for the specific show I am doing but I need to make a field that returns a number, one for each record, starting with 1 every time and counts up. I tried a couple variations on DCount function but that just didn't match what I needed. Autonumbering the table doesn't do what I want. I just need it to return a number that I could use in a report.


    Now for a more detailed description in case there is a better way of doing it. I have a table that has a show field(that's what the query filters) and in each record I have 2 fields(unit 1 output and unit 2 input). I want each record to have a number so that my report can place a number in the correct place on the picture/diagram(already made and cant be changed from its configuration, represents something physical that needs to be seen). Eg. Show 1, Unit A, Unit B, 1. So on the picture can have a 1 on both the plug for unit A and Unit B, so that you can hook them up.

    Any help would be great. Thank You. Let me know if I need to make anything more clear.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,601
    What is the picture/diagram object and how does it connect to data?

    Textboxes in report have RunningSum property. Set the textbox ControlSource to =1 and the RunningSum to OverAll. This can calculate a sequential number. I just don't understand how this relates to the picture you describe.

    There is a query technique to calculate a sequential number but requires a unique ID field in table (the autonumber field can serve this purpose) or combination of fields to create a unique identifier. This example uses an autonumber ID.

    SELECT *,
    (SELECT Count([ID]) AS HowMany
    FROM tablename AS Dupe
    WHERE Dupe.ID < tablename.ID) + 1
    AS Rank
    FROM tablename;

    Do you want to provide project for analysis? Follow instructions at bottom of my post.
    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.

  3. #3
    Megood is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    17
    Thank you for the reply, I will try this as soon as I can.



    http://www.flickr.com/photos/43691696@N03/6941793676/

    As you can see now, the for that is in use has the location of the equipment as A12 or E44. I am replacing the number that is currently on it with the actual name and the empty box below it is where I need to insert my new numbers. This is where I actually insert plugs into a physical unit and it has this layout and cannot change. I just want to be able to use the table I have with what goes to what and be able to put in a number starting with 1 in that box. I hope I make sense.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,601
    Nope, don't understand any of this.

    The original post talks about 'a show I am doing' and later post talks about 'location of equipment'.

    I gave an example of how a query can generate a sequential number. You cannot apply that to your requirements?
    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.

  5. #5
    Megood is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    17
    Thank you for your help. I got the numbering issue fixed. Sorry it took so long. That project was put on the back burner for a bit.

    My next problem is to create a report from that link I posed above. In that picture you can see numbers in the boxes and a blank box below it. As is right now they write a number in the blank box below that number. So say that A 24 has a 1 and B 37 has a 1, so you know to plug the cable into device A 24 and the other end of that cable to B 37 and so on with the next one showing 2.

    As of right now I have the table with both the the units to plug into and not the number that corresponds to it that will be entered. I'm afraid its going to take a long time to create this form. I think I can use text boxes in the place of the blank ones that will show that number but I still need to figure out how exactly to do this. I hope this will help.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,601
    You want a report or a form? Creating form or report to look like that to show blank boxes is easy. It might be difficult to show data in that arrangement. It looks like records are arranged horizontally (left to right). I doubt crosstab query can accomplish, for other methods review:
    http://datapigtechnologies.com/flashfiles/crosstab.html
    http://allenbrowne.com/func-concat.html
    http://forums.aspfree.com/microsoft-...ry-322123.html

    I think the last link has example closest to your requirements.
    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
    Megood is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    17
    It needs to be a report. The links didn't seem to be what I need. I think what It'll take is a bunch of text boxes with the values of that is there and if it shows true enter the number corresponding for that query. That means all boxes will be tome my hand. I might be able to set up a numbering system by adding values to the letters and adding that to the number. Then I could increse the values by 1 for every box I make.

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

Similar Threads

  1. Sequencial numbering
    By spQQky in forum Forms
    Replies: 1
    Last Post: 01-27-2012, 03:16 PM
  2. Page numbering
    By gumberculies in forum Reports
    Replies: 1
    Last Post: 04-11-2011, 02:21 PM
  3. Update query for numbering the records
    By kumar.dkr in forum Queries
    Replies: 4
    Last Post: 11-24-2010, 06:06 AM
  4. Numbering records
    By knightjp in forum Database Design
    Replies: 0
    Last Post: 08-17-2008, 07:07 AM
  5. Auto Numbering
    By rkruczk in forum Forms
    Replies: 0
    Last Post: 10-09-2006, 04:25 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