By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,775 Members | 2,658 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,775 IT Pros & Developers. It's quick & easy.

creating primary key from stored info

P: n/a
I have a DB in which I need to create a primary key from the
information stored in 3 fields; firstname, lastname, and telephone.
so John, Smith, 1234567890 would formulate in the conatctID field the
follwing JohnSmith7890. Is this possible? I'm new to this so any
help would be appreciated.

Also is there any way to lengthen the text field to hold more than 255
char?

Thank you,
Parveen
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
In the table design screen highlight the three fields and then click
on the primary key button - you could also create a unique index for
the fields

pl****@psu.edu (pls146) wrote in message news:<32**************************@posting.google. com>...
I have a DB in which I need to create a primary key from the
information stored in 3 fields; firstname, lastname, and telephone.
so John, Smith, 1234567890 would formulate in the conatctID field the
follwing JohnSmith7890. Is this possible? I'm new to this so any
help would be appreciated.

Also is there any way to lengthen the text field to hold more than 255
char?

Thank you,
Parveen

Nov 12 '05 #2

P: n/a
pl****@psu.edu (pls146) wrote in message news:<32**************************@posting.google. com>...
I have a DB in which I need to create a primary key from the
information stored in 3 fields; firstname, lastname, and telephone.
so John, Smith, 1234567890 would formulate in the conatctID field the
follwing JohnSmith7890. Is this possible? I'm new to this so any
help would be appreciated.

Also is there any way to lengthen the text field to hold more than 255
char?

Thank you,
Parveen


Q2: No, if you want bigger, you'll have to use a memo field.

Q1: VERY bad design. Why not use an autonumber? That's what they're
for. the actual value of the primary key isn't really relevant anyway
- it's just for you to know which records belong with which. To
directly answer your question, yes it is possible to create a
multi-field primary key (hold down the shift key and click on them,
then click the key in design view). But This is an ugly design. I
would not recommend it.
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.