Re: updating field with data from other fields



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".

>>> oh.ok.. the 'select' query actually did work...
Well... to make a fine point, it should have been an "Update" query.

Glad it worked out...
Al Camp

"cwr" <cwr@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:BCD5D793-CB1A-4A51-B802-029BF4F94F73@xxxxxxxxxxxxxxxx
> 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" wrote:
>
>> 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" <cwr@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:62C8AF83-BA21-4C46-9221-DC4CACBAAFCA@xxxxxxxxxxxxxxxx
>> > 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" wrote:
>> >
>> >> Try an Update query to update your EMail field with...
>> >> = [LastName] & Left([FirstName],1) & "@abcd.com"
>> >> hth
>> >> Al Camp
>> >>
>> >> "cwr" <cwr@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> >> news:C545C78C-3CB4-46A9-A96F-EA189601BE9F@xxxxxxxxxxxxxxxx
>> >> >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. JonesG@xxxxxxxx
>> >> >
>> >> > the only thing different will be the lastname and first letter of
>> >> > first
>> >> > name
>> >> >
>> >> > what's the best way to do this...?
>> >>
>> >>
>> >>
>>
>>
>>


.



Relevant Pages

  • Re: Sum several fields and "IF"
    ... But I cannot get it to stay in the control source of the txt box. ... "Al Camp" wrote: ... the syntax should be OK. ... All commas are where they should be. ...
    (microsoft.public.access.gettingstarted)
  • Re: updating field with data from other fields
    ... the syntax does look a little confusing with those in there ... ampersands in there ... "Al Camp" wrote: ...
    (microsoft.public.access.gettingstarted)
  • Re: updating field with data from other fields
    ... but when doing update was messing up the syntax ... "Al Camp" wrote: ... > Try an Update query to update your EMail field with... ...
    (microsoft.public.access.gettingstarted)
  • Re: More than one parameter
    ... What you need to do is something like this (switch your query to SQL View to ... prompt comes up male or female. ... then next prompt is Day camp or High school ... camp, I pick Day camp and it is blank. ...
    (microsoft.public.access.queries)
  • Re: pass arguments to function
    ... VB syntax is funny. ... argument list of a sub procedure. ... >I am passing values for search criteria, query and sort order for the query ... >Public Sub QuickSearch(strSearch As String, qry As String, ord As String) ...
    (microsoft.public.access.modulesdaovba)