Access Database Setup Help

  • Thread starter Thread starter Pavan
  • Start date Start date
P

Pavan

Hi there,
I am very new to Access and have two existing tables which I am trying to
use to create a database.

One is a table of Rectangles, with columns:
Rectangle 1, Point 1, Point 2, Point 3, Point 4
Rectangle 2, Point 3, Point 4, Point 5, Point 6, etc

The other is a table of Points:
Point 1, X value, Y value
Point 2, X value, Y value etc.

I am trying to set up a Query to give each Rectangle all four points, each
with an X and Y value. I have taken basic Access Training, but can't seem to
figure out how to query multiple Columns in the Rectangle Table find data in
the Points. I've also tried creating multiple queries, however I can't seem
to relate two queries if I create one Query for Point 1 and another for Point
2.

I could really use some help with this. Thanks in advance!
 
Hi there,
I am very new to Access and have two existing tables which I am trying to
use to create a database.

One is a table of Rectangles, with columns:
Rectangle 1, Point 1, Point 2, Point 3, Point 4
Rectangle 2, Point 3, Point 4, Point 5, Point 6, etc

The other is a table of Points:
Point 1, X value, Y value
Point 2, X value, Y value  etc.

I am trying to set up a Query to give each Rectangle all four points, each
with an X and Y value.  I have taken basic Access Training, but can't seem to
figure out how to query multiple Columns in the Rectangle Table find datain
the Points.  I've also tried creating multiple queries, however I can'tseem
to relate two queries if I create one Query for Point 1 and another for Point
2.

I could really use some help with this.  Thanks in advance!

Pavan,
It appears that you can have a single table containing this
information without two.
One possibility is to have fields defined as below:
Rectangle 1, Point 1x, Point1y, Point 2x, Point2y, Point 3x, Point
3y,Point 4x, Point 4y
Rectangle 2, etc

You could then create a query containing a field defined as:
P1xy=: [Point1x]&","&[Point1y] (which would give you the XY value in
"X,Y" format for point1)
P2xy=: [Point2x]&","&[Point2y]
P3xy=: etc...

You are still inputting the same data but using the query on
information display. The points 1-4 are still associated with each
proper rectangle.
 
Unbridled said:
Hi there,
I am very new to Access and have two existing tables which I am trying to
use to create a database.

One is a table of Rectangles, with columns:
Rectangle 1, Point 1, Point 2, Point 3, Point 4
Rectangle 2, Point 3, Point 4, Point 5, Point 6, etc

The other is a table of Points:
Point 1, X value, Y value
Point 2, X value, Y value etc.

I am trying to set up a Query to give each Rectangle all four points, each
with an X and Y value. I have taken basic Access Training, but can't seem to
figure out how to query multiple Columns in the Rectangle Table find data in
the Points. I've also tried creating multiple queries, however I can't seem
to relate two queries if I create one Query for Point 1 and another for Point
2.

I could really use some help with this. Thanks in advance!

Pavan,
It appears that you can have a single table containing this
information without two.
One possibility is to have fields defined as below:
Rectangle 1, Point 1x, Point1y, Point 2x, Point2y, Point 3x, Point
3y,Point 4x, Point 4y
Rectangle 2, etc

You could then create a query containing a field defined as:
P1xy=: [Point1x]&","&[Point1y] (which would give you the XY value in
"X,Y" format for point1)
P2xy=: [Point2x]&","&[Point2y]
P3xy=: etc...

You are still inputting the same data but using the query on
information display. The points 1-4 are still associated with each
proper rectangle.


Thanks for the response. Unfortunately, thats not an option. Those points
are widely used, and I need to have those in an table themselves. I could
really use some help on this. Thanks in advance
 
You only need two points to define a rectangle, the top left angle, and the
bottom right angle, the positions of the other two angles are inferred from
these. So with your two tables the Rectangles table would have columns
Rectangle, TopLeftPoint and BottomRightPoint say. You would then join the
table to two instances of the Points table with the TopLeftPoint column
referencing one row of Points and the BottomRightPoint column referencing
another row of Points.

Or you could have one Rectangles table with columns Rectangle, TopLeftX,
TopLeftY, BottomRightX and BottomRightY.

Ken Sheridan
Stafford, England
 
Hi,

Time to think outside the box (or really inside :) given X is horizontal
and Y is vertical on a grid I have 0,2 as uper left and 2,0 as Bottom left -
so TR = (BLX,TLY) BL = (TLX,BLY) for 2,2 and 0,0 - it works - now try 1,2 and
1,0 doesn't work - you did say something about an angle but only used points
- if you can't see it angle your head 45 degres and think (inside the box:)

Craig
 
Back
Top