Hi I am trying to use SQL to update a table (tEmailRx) with information from a form. The table is laid out as:
CreateDate - Date
MR - Number (long Int)
RxType - Text
Office - Text
Ws - Text
I am trying to use the following code:
sSQL = "UPDATE tEmailRx tEmailRx.CreateDate = #" & Date & "#, tEmailRx.MR = " & Me.ID & ", tEmailRx.RxType='CL', tEmailRx.Office='" & sOffice & ",tEmailRx.Ws = Environ$(""computername"")"
Which results in:
UPDATE tEmailRx tEmailRx.Date = #11-15-2017#, tEmailRx.MR = 126011, tEmailRx.RxType='CL', tEmailRx.Office='WB,tEmail
Rx.Ws = Environ$("computername")
But I am getting an error. What am I doing wrong with my syntax? SQL is a very weak link for me - Thanks!