Query help needed - Please!

  • Thread starter Thread starter Fred
  • Start date Start date
F

Fred

I am trying to create a query that will take the the first
character in a field <fname>, the first character in a
second field <lname> and combine them with the another
field called <siteno> to produce a field called <uname>.
Please see the example below;

<fname> <lname> <siteno> <uname>
Frank Ludlow 0100 fl0100
Chris Smith 0101 cs0101

Thanks for your help!

Fred
 
SHould be something like this:
in the field name of the query, type this

uname: (left([fname],1) & (left([lname],1) & ([siteno])))

Make sure the parenthesis are right, but other than that, this should work.

Jay
 
I am trying to create a query that will take the the first
character in a field <fname>, the first character in a
second field <lname> and combine them with the another
field called <siteno> to produce a field called <uname>.
Please see the example below;

<fname> <lname> <siteno> <uname>
Frank Ludlow 0100 fl0100
Chris Smith 0101 cs0101

Thanks for your help!

Fred

You've gotten a couple of accurate answers... but just one concern
here.

If you want <uname> to be a unique user name, THIS WILL NOT WORK.
Suppose at site 100 you have a Frank Ludlow and a Frannie Laird?

To ensure uniqueness you'll need a MUCH more complicated algorithm...
and might do better to not use a constructed artificial key at all,
and instead just use an Autonumber. Keep it concealed, and display the
first and last names and site number as data.
 
Back
Top