updating field with data from other fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have an access database....it has first name, last name and a field for
email address of every entry, but the email address is empty...i need to
somehow concatenate the last name, the first initial of the first name and a
hard coded literal that will be the same for all....

i.e. (e-mail address removed)

the only thing different will be the lastname and first letter of first name

what's the best way to do this...?
 
Try an Update query to update your EMail field with...
= [LastName] & Left([FirstName],1) & "@abcd.com"
hth
Al Camp
 
Thanks..well, i was close...was using the following for just the query
using 7 because can only use first 7 letters of last name if more

Expr1: Left([LastName],7) & "" & Left([FirstName],1) & "" & "@abcd.com"

but when doing update was messing up the syntax

thank you, thank you

Al Camp said:
Try an Update query to update your EMail field with...
= [LastName] & Left([FirstName],1) & "@abcd.com"
hth
Al Camp

cwr said:
i have an access database....it has first name, last name and a field for
email address of every entry, but the email address is empty...i need to
somehow concatenate the last name, the first initial of the first name and
a
hard coded literal that will be the same for all....

i.e. (e-mail address removed)

the only thing different will be the lastname and first letter of first
name

what's the best way to do this...?
 
cwr,
You tried...
Expr1: Left([LastName],7) & "" & Left([FirstName],1) & "" & "@abcd.com"

You shouldn't need the ""s in between each item.

Good deal.
Al Camp

cwr said:
Thanks..well, i was close...was using the following for just the query
using 7 because can only use first 7 letters of last name if more

Expr1: Left([LastName],7) & "" & Left([FirstName],1) & "" & "@abcd.com"

but when doing update was messing up the syntax

thank you, thank you

Al Camp said:
Try an Update query to update your EMail field with...
= [LastName] & Left([FirstName],1) & "@abcd.com"
hth
Al Camp

cwr said:
i have an access database....it has first name, last name and a field
for
email address of every entry, but the email address is empty...i need
to
somehow concatenate the last name, the first initial of the first name
and
a
hard coded literal that will be the same for all....

i.e. (e-mail address removed)

the only thing different will be the lastname and first letter of first
name

what's the best way to do this...?
 
oh.ok.. the 'select' query actually did work with that..but when i get back
into work monday will try it without those ""s..
the syntax does look a little confusing with those in there
i took that from some other forum...but was also not clear on why so many
ampersands in there

thanks

Al Camp said:
cwr,
You tried...
Expr1: Left([LastName],7) & "" & Left([FirstName],1) & "" & "@abcd.com"

You shouldn't need the ""s in between each item.

Good deal.
Al Camp

cwr said:
Thanks..well, i was close...was using the following for just the query
using 7 because can only use first 7 letters of last name if more

Expr1: Left([LastName],7) & "" & Left([FirstName],1) & "" & "@abcd.com"

but when doing update was messing up the syntax

thank you, thank you

Al Camp said:
Try an Update query to update your EMail field with...
= [LastName] & Left([FirstName],1) & "@abcd.com"
hth
Al Camp

i have an access database....it has first name, last name and a field
for
email address of every entry, but the email address is empty...i need
to
somehow concatenate the last name, the first initial of the first name
and
a
hard coded literal that will be the same for all....

i.e. (e-mail address removed)

the only thing different will be the lastname and first letter of first
name

what's the best way to do this...?
 
Those ""s are just nulls. They won't effect the concatenation because
they're like "blanks that take up no space". But, they are unncessary.

A common concatenation is [State] & " " & [Zip] where the " " puts a
"space" in the string.
But "" is just another way of saying "nothing".
Well... to make a fine point, it should have been an "Update" query.

Glad it worked out...
Al Camp

cwr said:
oh.ok.. the 'select' query actually did work with that..but when i get
back
into work monday will try it without those ""s..
the syntax does look a little confusing with those in there
i took that from some other forum...but was also not clear on why so many
ampersands in there

thanks

Al Camp said:
cwr,
You tried...
Expr1: Left([LastName],7) & "" & Left([FirstName],1) & "" & "@abcd.com"

You shouldn't need the ""s in between each item.

Good deal.
Al Camp

cwr said:
Thanks..well, i was close...was using the following for just the query
using 7 because can only use first 7 letters of last name if more

Expr1: Left([LastName],7) & "" & Left([FirstName],1) & "" & "@abcd.com"

but when doing update was messing up the syntax

thank you, thank you

:

Try an Update query to update your EMail field with...
= [LastName] & Left([FirstName],1) & "@abcd.com"
hth
Al Camp

i have an access database....it has first name, last name and a field
for
email address of every entry, but the email address is empty...i
need
to
somehow concatenate the last name, the first initial of the first
name
and
a
hard coded literal that will be the same for all....

i.e. (e-mail address removed)

the only thing different will be the lastname and first letter of
first
name

what's the best way to do this...?
 
Back
Top