How to use builtin functions

A

~~Alan~~

I am new to M/S Access. I want to create a table with a primary key built
on the following:

Lastname upto 1st 6 characters + 1st initial + middle initial

I know where in table and field design to do this. I just do not know the
formula (systax) to use. Assume field names are LastName, FirstName,
MiddleInitial.

Thank you,
~Alan
 
L

Liz

I am curious why you want to set it up to the 1st 6
characters of the last name?
-----Original Message-----
=Left([field name],6)

Where field name is the name of your field.
Hope this helps.
-----Original Message-----
I am new to M/S Access. I want to create a table with a primary key built
on the following:

Lastname upto 1st 6 characters + 1st initial + middle initial

I know where in table and field design to do this. I just do not know the
formula (systax) to use. Assume field names are LastName, FirstName,
MiddleInitial.

Thank you,
~Alan


.
.
 
A

~~Alan~~

Thank you, but how do I actually concatinate the parts of the 3 fields? I
have tried a lot of variations of your example.

~Alan


Liz said:
=Left([field name],6)

Where field name is the name of your field.
Hope this helps.
-----Original Message-----
I am new to M/S Access. I want to create a table with a primary key built
on the following:

Lastname upto 1st 6 characters + 1st initial + middle initial

I know where in table and field design to do this. I just do not know the
formula (systax) to use. Assume field names are LastName, FirstName,
MiddleInitial.

Thank you,
~Alan


.
 
A

~~Alan~~

I could use 8 characters or 7. I want to create a primary key based on this
data. It is better than using a number, IMHO.

Thanks,
~Alan

Liz said:
I am curious why you want to set it up to the 1st 6
characters of the last name?
-----Original Message-----
=Left([field name],6)

Where field name is the name of your field.
Hope this helps.
-----Original Message-----
I am new to M/S Access. I want to create a table with a primary key built
on the following:

Lastname upto 1st 6 characters + 1st initial + middle initial

I know where in table and field design to do this. I just do not know the
formula (systax) to use. Assume field names are LastName, FirstName,
MiddleInitial.

Thank you,
~Alan


.
.
 
V

Van T. Dinh

NOT recommended!

Names (or combinations of Last, First, Middle) can never
be guarantteed to be unique and therefore cannot be used
as the PrimaryKey.

*No where* in the Table Design that you can do this! (Liz
posted Validation, NOT constructing value of a Field from
values of other Fields.) If you still want to do this,
you have to use Form Events to do it. This means that you
need to make sure that data entry is done *exclusively* on
Forms, NOT datasheet of Tables / Queries.

HTH
Van T. Dinh
MVP (Access)
 
F

fredg

~~Alan~~ said:
I could use 8 characters or 7. I want to create a primary key based on this
data. It is better than using a number, IMHO.

Thanks,
~Alan

Alan,
Better than a Number? Really?
And how will you differentiate between
John Paul Hollingsworth and his brother James Philip?
To say nothing of their neighbor, Jeremiah Paul Hollings.

There are 2-1/2 columns of J Smith's in my local phone book alone.

Bad idea!!
 
A

~~Alan~~

fredg said:
Alan,
Better than a Number? Really?
And how will you differentiate between
John Paul Hollingsworth and his brother James Philip?
To say nothing of their neighbor, Jeremiah Paul Hollings.

There are 2-1/2 columns of J Smith's in my local phone book alone.

Bad idea!!
I will have to deal with it, won't I. But this is how usernames are given
out in many corporations.

To ask a person to remember an ID based on their name is easier for that
person to remember than yet another number they have to deal with.

Other questions though, you should ask are 1) what about those folks that
have more than one middle initial and 2) those people that have no middle
initial.

With all due respect to those I'm asking help from, I will have to deal with
it when the time comes.

Thank you anyway,
~Alan
 
L

Liz

Alan,
i didn't realize you wanted to concatinate the names and
initials.
Sorry. Not going to be help on this one after all.
-----Original Message-----
Thank you, but how do I actually concatinate the parts of the 3 fields? I
have tried a lot of variations of your example.

~Alan


=Left([field name],6)

Where field name is the name of your field.
Hope this helps.
-----Original Message-----
I am new to M/S Access. I want to create a table with
a
primary key built
on the following:

Lastname upto 1st 6 characters + 1st initial + middle initial

I know where in table and field design to do this. I just do not know the
formula (systax) to use. Assume field names are LastName, FirstName,
MiddleInitial.

Thank you,
~Alan


.


.
 
F

fredg

I will have to deal with it, won't I. But this is how usernames are given
out in many corporations.

To ask a person to remember an ID based on their name is easier for that
person to remember than yet another number they have to deal with.

Other questions though, you should ask are 1) what about those folks that
have more than one middle initial and 2) those people that have no middle
initial.

With all due respect to those I'm asking help from, I will have to deal with
it when the time comes.

Thank you anyway,
~Alan

Alan,

Actually, the user doesn't have to 'remember' anything to find a particular
record.
By using a Combo Box with ID, Name, Initials, some other unique identifying
field(s) (such as SSN or Address) the user can quickly find whoever is
being searched for. To make it even simpler, the Combo Box wizard can set
it all up for you.

And yes, I thought about the more than one initial and the no initial
situations you mentioned above, but I had no desire to overload the
message.

I wish you well in your 'dealing with it' in the future.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top