Field Problem

superblades

New member
Local time
Today, 11:46
Joined
Sep 20, 2006
Messages
9
Hi all, im in need of some advice,

i have a database containing a list of people with a unique key e.g. 12345, firstname, surname etc. and im wanting to create either a VBA or Macro that will take the first character of their firstname and surname and prefix this to the unique key in another field e.g.

unique no 12345
firstname john
surname smith
account js12345

i have no idea and googling has brought nothing up!

any help would be most appreciated, thanks

superlbades
 
You can use an update query.
UPDATE MyTable
SET NewField = LEFT([FirstName],1] & LEFT([LastName],1) & cstr([UniqueKey])

I am assumiong your unique key is a numeric field in the above example.
 
still having problems :(

UPDATE MyTable
SET Logon = LEFT([FirstName],1) & LEFT([LastName],1) & cstr([Employee Number])

All i get is a '0' in the logon field for all entries,

the employee number is a string not numeric.

Cheers

superblades
 

Users who are viewing this thread

Back
Top Bottom