Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 16th, 2010, 05:31 AM
Friend of Wrox
 
Join Date: Apr 2007
Posts: 110
Thanks: 1
Thanked 2 Times in 2 Posts
Send a message via MSN to ayazhoda
Default Sorting Records in table

Hi Guys

I am trying to find a way to sort out records in table based on sequence

Table A
Fields
Select [yes/No]
Product [text]
Sequence [Number]

example

SELECT | PRODUCT | SEQUENCE
[ ]-------- ABC---------- 1
[ ]---------DEF---------- 2
[ ]---------IJK----------- 3
[ ]---------LMN---------- 4
[x]---------OPQ---------- 5
[x]
---------ABC---------- 6

Task to acheive

Those Products which are select with checkbox can be move to any place ( for example move sequence 5,6 after 2) and then rearrange order.

SELECT | PRODUCT | SEQUENCE
[ ]-------- ABC---------- 1
[ ]---------DEF---------- 2
[x]---------OPQ---------- 3
[x]
---------ABC---------- 4
[ ]---------IJK----------- 5
[ ]---------LMN---------- 6


Any help or suggestion

Thanks
 
Old September 20th, 2010, 02:38 PM
Registered User
 
Join Date: Jun 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Cool Changing Record Sequence

I'm doing something similar for our production schedule database.

My approach is to use a temporary table with an autonumber field to generate a "SortID" for my schedule table. The SortID is a regular number field in the schedule table, which was copied from the temp table's autonumber field.

This puts all new entries at the bottom of the list in the schedule table.

Then to move an entry up or down, the production supervisor selects the item they want to move and then clicks an up or down arrow to move the item.

Clicking the arrow swaps the SortID of the selected record with the SortID of the record above (or below) depending on which way they want it to move.

Hope this helps.

8^D
 
Old September 20th, 2010, 04:00 PM
Friend of Wrox
 
Join Date: Apr 2007
Posts: 110
Thanks: 1
Thanked 2 Times in 2 Posts
Send a message via MSN to ayazhoda
Default

I've done that by using similar way :)

But I had a problem when sorting rows on the fly but it is resolved now.

I had issue with sorting rows in a order. All the selected item must be inserted where you want to insert them but push rest of selected row down or row up with out changing orders or sequence b/c production want to prioritise only few item without effecting others.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting and fixed Table Headers in HTML Table..Urgent help!! cooltechie HTML Code Clinic 5 September 17th, 2010 05:59 AM
SORTING an table hewstone999 Access VBA 1 June 12th, 2008 09:35 AM
Collapsible table sorting problem sendkamal Javascript 0 February 27th, 2007 12:33 PM
copy and append records from table-A to table B bhunter Access 6 March 9th, 2004 02:02 PM
thousands records enter one table to another table mateenmohd SQL Server 2000 3 July 17th, 2003 07:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.