text conversion/calculation on a form.

  • Thread starter Thread starter Andrew
  • Start date Start date
A

Andrew

Help!
I'm totally new to Access, and need quite a bit of help!
I need to store coordinate data (x and y) in two fields.
The user will enter this in a form.

However, I want the form to input the Primary Key like
this: Take the text version of "x", the text version
of "y", and combine it so I have a text value "x,y"; this
will be the unique value of the Primary Key for that entry.

(We want to retain the numerical value of x and y so we
can run queries on them.)

Thanks so much!
Andrew
 
You don't realy need to combine them or do anything fancy.

In your table, go into design view.

Click the XCoordinateField and hold down the CTRL key while clicking the
YCoordinateField. Then both should be highlighted. Click the Key button in
your menu.

This will set the key for that field to X and Y combined. If you select the
View menu and then select INDEXES, you will see your combined key.


To pull these on a form or report as one field, simply add an unbound text
box and put something like...

= [XCoordinateField] & "/" & [YCoordinateField]




Rick B

Help!
I'm totally new to Access, and need quite a bit of help!
I need to store coordinate data (x and y) in two fields.
The user will enter this in a form.

However, I want the form to input the Primary Key like
this: Take the text version of "x", the text version
of "y", and combine it so I have a text value "x,y"; this
will be the unique value of the Primary Key for that entry.

(We want to retain the numerical value of x and y so we
can run queries on them.)

Thanks so much!
Andrew
 
Back
Top