Link to home
Start Free TrialLog in
Avatar of maximyshka
maximyshka

asked on

Use "-" in the unique field

Hi, does it make any difference whether or not I will use "-" in the Unique number field.

Example "1111111111-222222".  We have such field in master file for reporting purposes.

Unique field is the main field we use for programming, groupping, indexing, reporting etc.

Is this OK to use field "1111111111-222222" or I have to use field "1111111111222222" as primary key and use field ""1111111111-222222" for reporting purposes
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Why not use the Access Auto Number as your Primary Key ... then it becomes a non-issue.

mx
You can use "-" in a unique number field. However, it is obviously text and not a number. Neither will it be automatically incremented as an Autonumber type. Your only requirements would be uniqueness.
Avatar of maximyshka
maximyshka

ASKER

I have a field in the format 1111111121-2222222 which I want to use as primary key. Yes this field i text. Incrementing not needed
Then, yes, you may include and use the "-".

Lee
MX, autonumber will not work.  Value "1111111121-2222222" is uniquely identify all information about this loan.

Something similar to composite key

1111111121
2222222
ASKER CERTIFIED SOLUTION
Avatar of lee555J5
lee555J5
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks a lot