473,320 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Updating project rankings automatically - Help needed

I'm building a project database to keep track of the various
engineering projects ongoing in our department. These projects will be
grouped by priority ([cmbPriority]=High, Medium, Low) and ranked within
the priority ([Rank]=1,2,3,etc.). What I'd like for it to do is
automatically update rankings when a project rank is changed, a new
project comes in, or a project is completed. For example, let's say
there are 4 high priority projects. If High #2 is changed to High #4,
then old High #3&4 should become High #2&3. Or, if High #2 is
completed, then High #3&4 should become High #2&3. If we add a new
project and rank it High #3, then High #3&4 should become High #4&5.
I'm assuming I'm going to have to use an append query for this, but I
just can't seem to figure it out to cover all of the scenarios. Any
help would be GREATLY appreciated.

Nov 13 '05 #1
1 2032
prime80 wrote:
I'm building a project database to keep track of the various
engineering projects ongoing in our department. These projects will be
grouped by priority ([cmbPriority]=High, Medium, Low) and ranked within
the priority ([Rank]=1,2,3,etc.). What I'd like for it to do is
automatically update rankings when a project rank is changed, a new
project comes in, or a project is completed. For example, let's say
there are 4 high priority projects. If High #2 is changed to High #4,
then old High #3&4 should become High #2&3. Or, if High #2 is
completed, then High #3&4 should become High #2&3. If we add a new
project and rank it High #3, then High #3&4 should become High #4&5.
I'm assuming I'm going to have to use an append query for this, but I
just can't seem to figure it out to cover all of the scenarios. Any
help would be GREATLY appreciated.


This is not a trivial problem so: <BeginHandWavingMode> I think the
cleanest way to do this is using linked lists. Linked lists can be
implemented in Access by using a Long field to contain the value of an
ID field (simulated pointer). Each item in each priority list points
to the next item. You'd need Add, Move (reprioritize Rank within a
Priority Group or Delete and Add to a different Priority Group) and
Delete operations. Most data structures books explain how to do these
operations in detail, especially the one by Nicolas Wirth. Hint: The
people in this NG love answering questions like this so you probably
don't need to visit the library.

Maybe the first rank element in the linked list (for a given priority
group) could contain a marker. This marker may need to be moved
depending on the operation. With three different markers one table
could hold all three linked lists. A single table would make it
somewhat easier to move between Priority Groups. You'd want to use a
form to handle these operations. Then you'd need a way to traverse the
lists to update priority numbers so that the data can be displayed
easily in a query. A Null value for the next ID would terminate the
list. There's potential ugliness any way you implement it. If you
don't want to use linked lists you can remove Rank number 3 and then
run an update query to subtract 1 from any Rank > 3 (within the
Priority Group) etc. Either way, you still have to deal with what to
do when the priority list is empty and other gotchas.
<EndHandWavingMode>

I hope someone comes up with something much easier.

James A. Fortune

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Amir Michail | last post by:
Hi, Google is good, but not perfect. CollaborativeRank takes Google rankings as a starting point but allows users to tweak them in a collaborative way to achieve something even better. ...
6
by: Hennie de Nooijer | last post by:
Hi, Currently we're a building a metadatadriven datawarehouse in SQL Server 2000. We're investigating the possibility of the updating tables with enormeous number of updates and insert and the...
6
by: Hasanain F. Esmail | last post by:
Hi all, I sincerly thank you all in advance for your help to solve this problem. I have been trying to find a solution to this problem for sometime now but have failed. I am working on a...
6
by: Alan Krueger | last post by:
Is there a way to automatically include C# files (.cs) generated by a third-party tool into a Visual C# .NET build? It's possible the set of files generated by this tool might change. Adding...
3
by: | last post by:
Hello, I have created an ASP.NET 2.0 application that utilized a Gridview Control to display and update/delete data. The problem I am having is that the gridview control is displaying the data...
1
by: ScottL | last post by:
Hello, I have a asp.net Visual Basic web solution with 3 projects: A user interface project (ProjectUI), a Business Object Layer project (ProjectBOL) and a Data Access Layer Project...
14
by: el_sid | last post by:
Our developers have experienced a problem with updating Web References in Visual Studio.NET 2003. Normally, when a web service class (.asmx) is created, updating the Web Reference will...
5
by: Mark R. Dawson | last post by:
Hi all, I may be missing something with how databinding works but I have bound a datasource to a control and everything is great, the control updates to reflect the state of my datasource when I...
4
by: jocknerd | last post by:
About 10 years ago, I wrote a C app that would read scores from football games and calculate rankings based on the outcome of the games. In fact, I still use this app. You can view my rankings at...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.