I need to look at the value of a field (Employee Name) and if it does not contains a "(" then update the record with the correct format which should be "Smith, John (John)", compiling the name from 4 fields:
However if the Preferred Name is empty then use the firstName.
I need to create a function that will update the existing table so that the Name = "Smith, John (John)" or "Smith, K (Karen)"
So I will need an Update query or method to repopulate the Name field with the correct syntax.
Function SetName(nName As String)
dim rs as recordset
Set curDB = currendb()
strSQL = "Select Name from TT_GeneralInfo"
Set rs = curDB.OpenRecordset(strSQL)
Do Until rs.EOF
nName = rs.Fields("Name")
if instr(nname), "("))= true then