Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2007
    Posts
    5

    Unanswered: Manual sort of subform in datasheet format ?

    For Access 2002 and 2003 ( I use the same DB on 2 different PCs )

    I have a form and subform. The form is tabulated and the subform is in datasheet format. Ideally I would like to be able to drag and drop the lines in this subform to re-order them. The text data is not in a form that can be automatically sorted. In Excel I could simply insert a blank line anywhere in the sheet and then cut and paste etc. This does not seem possible in Access

    Have I missed something or do I just have to put up with it ??

    John Cranmer

  2. #2
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    I am a little confused by your post. You should be able to sort your data in the subform using the RecordSource.

    Also, when you want to copy and paste, you need to add record selectors to the source and highlight the records to copy, then you need to allow additions to the destination and paste the copied records to the * record.

  3. #3
    Join Date
    Oct 2007
    Posts
    5
    I will try to explain better.

    Obvisously the data sheet view looks like a spreadsheet. In excel I can insert a blank row anywhere in the sheet and then cut and paste a whole line of data into this new blank line. I cannot seem to do this in the Access datasheet view.

    I want to order the data based on a text field. The text is not sortable alphabetically. New records usually need to be added into the middle of the data sheet not at the end. I could add an index field to the table and sort on that but if I want to add a record to the middle is there any simple way of doing this. Would I not have to change all the index numbers after the new entry ?. Perhaps I could do it in VBA but I was hoping to find a cut and paste option like Excel has.

    John

  4. #4
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    Create a numeric field that is of type Single or Double. These are floating point type of numbers, therefore you can use the fractional part of the number (after the decimal point) to "insert" records. Let me illustrate:
    Start with:
    1.00
    2.00
    3.00
    Insert a record between 2.00 and 3.00 would be to insert a record with the number 2.05, or 2.35, or 2.85. You would have 99 choices for the first insert. And if you ever needed to, you could change a couple of the numbers so you could insert more above or below an already "inserted" record. I have done this many times for my clients, and it works very well.
    By the way, Access does not support cut and paste like Excel does. Access expects something to help it sort your data, therefore this numeric field I suggested.

  5. #5
    Join Date
    Oct 2007
    Posts
    5
    Thanks for that - one of my OH BOTHER !!!***!!!!! moments

    I had implimented the index idea and that worked OK but I had not thought of using singles rather than integers. Very obvious once it has been pointed out.

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •