Hello,
I have a piece of code which is writing to a table.
Code:
Set rst = CurrentDb.OpenRecordset("tLogUser", , dbAppendOnly) rst.AddNew
rst![LogOutTime] = Now()
rst![UserName] = Environ("UserName")
rst![LocationName] = Environ("ComputerName")
rst![LoginName] = "'" & DLookup("EmpID", "tblLogin", "locationCurrent = '" & Environ("ComputerName") & "'") & "'"
rst.Update
rst.Close
I recently added the field LoginName to this table. The code had worked well and all previous aspects of the code continue to work. However, All that is populated in the field LoginName is a single ". I have tried several variations and have made no progress.
Thanks for any and all assistance.
________
Nevermind- I found the problem I dropped the "'" from the above code. I had done this earlier, but I realized that my calling procedures were out of order so the field location current was already emptied by the time this piece of code ran. Anyway it is solved.