Fix End Point (1 Viewer)

CementCarver

Registered User.
Local time
Yesterday, 22:07
Joined
Sep 18, 2007
Messages
19
:)Hello,

I have one Access table called plan_location where it contains the following columns: shape_id (number), seqnum (number), xcoord (number) and ycoord(number). The shape_id is a individual number for each planname, the seqnum is the number of points in the plan and the xcoord ycoord indicate the x,y location on the ground.

See example:

shape_id seqnum xcoord ycoord
70 0 609719.429 4818231.424
70 1 609745.69 4818251.119
70 2 609755.919 4818230.81
70 3 609781.767 4818243.946
70 4 609822.683 4818254.656
70 5 609871.71 4818261.276
70 6 609879.432 4818226.623
70 7 609814.948 4818218.313
70 8 609763.842 4818198.827
70 9 609730.066 4818165.801
70 10 609698.278 4818123.723
70 11 609668.359 4818142.025
70 12 609714.935 4818201.641
70 13 609729.686 4818214.026
70 14 609720.429 4818240.424

In the above example, although this is only one plan of thousands, the xcoord/ycoord value for seqnum=0 is not the same as the xcoord/ycoord value found in seqnum=14, thus this indicates an error.

I need to find a way to isolate those shape_id's with the beginning seqnum of 0 that is not the same as the highest seqnum of 14, in this case. The seqnum can range from 0 to any number, depending on the number of points.

If the seqnum of 0's xcoord/ ycoord values to NOT match the highest seqnum's xcoord/ycoord values, I need to find a way to insert the next highest seqnum and add the same xcoord/ycoord values found for seqnum = 0

How can this be done?

Thanks in advance..........CementCarver:confused:

Not sure how this is done..............
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 06:07
Joined
Jul 9, 2003
Messages
16,329
In the attached file the query "qryNeedUpdate" contains a list of records that need updating.

Now you need a routine that appends a new record with the FirstX and FirstY values.
 

Attachments

  • PointsOnPlan_1.zip
    13 KB · Views: 74

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 06:07
Joined
Jul 9, 2003
Messages
16,329
I have managed to create a routine that does the update, run the query "qryNeedUpdate" and you will see three records, run it again and they will be gone.

I'm not really happy with it, I would rather see it in a module, (not attached to a query as it is), but I'm not sure how to do it that way, or even if it is possible or desirable to do it that way?

Any advice would be welcome.
 

Attachments

  • PointsOnPlan_3.zip
    19.4 KB · Views: 87

CementCarver

Registered User.
Local time
Yesterday, 22:07
Joined
Sep 18, 2007
Messages
19
Uncle Gizmo,

Thanks for your help. I saw the 6x queries in your first reply. So do I just need to run the latest query supplied ie. qryNeedUpdate in the pointsonplan_3 database?

CementCarver
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 06:07
Joined
Jul 9, 2003
Messages
16,329
Yes .... Is the short answer! once you have run it, it won't return records anymore. So to test it again delete the table "tblData" and make a new copy from the backup "copy of tblData" and run it again.

I'm not sure if this is the best way to do it, but I don't know any other way! I would appreciate any help or advice!
 
Last edited:

CementCarver

Registered User.
Local time
Yesterday, 22:07
Joined
Sep 18, 2007
Messages
19
Uncle Gizmo,

Thanks again. I'll give it a try.

CementCarver
 

Users who are viewing this thread

Top Bottom