L
Laurel
I have the following code in my unload event. Even though ls_SQL is set to
a value which works OK when copied into the query window, only the first of
these actually updates the tblParameters table. Any idea what's going on
and what I can do about it?
TIA
LAS
If Not IsNull(txtLev1Privs) Then
ls_SQL = "Update tblParameters Set ParamValue = '" & txtLev1Privs &
_
"' Where ParamName = 'Level_1_Privileges'"
Call CurrentDb.Execute(ls_SQL, dbFailOnError)
End If
If Not IsNull(txtLev1Restricts) Then
ls_SQL = "Update tblParameters Set ParamValue = '" &
txtLev1Restricts & _
"' Where ParamName = 'Level_1_Restrictions'"
Call CurrentDb.Execute(ls_SQL, dbFailOnError)
End If
If Not IsNull(txtLev2Privs) Then
ls_SQL = "Update tblParameters Set ParamValue = '" & txtLev2Privs &
_
"' Where ParamName = 'Level_2_Privileges'"
Call CurrentDb.Execute(ls_SQL, dbFailOnError)
End If
a value which works OK when copied into the query window, only the first of
these actually updates the tblParameters table. Any idea what's going on
and what I can do about it?
TIA
LAS
If Not IsNull(txtLev1Privs) Then
ls_SQL = "Update tblParameters Set ParamValue = '" & txtLev1Privs &
_
"' Where ParamName = 'Level_1_Privileges'"
Call CurrentDb.Execute(ls_SQL, dbFailOnError)
End If
If Not IsNull(txtLev1Restricts) Then
ls_SQL = "Update tblParameters Set ParamValue = '" &
txtLev1Restricts & _
"' Where ParamName = 'Level_1_Restrictions'"
Call CurrentDb.Execute(ls_SQL, dbFailOnError)
End If
If Not IsNull(txtLev2Privs) Then
ls_SQL = "Update tblParameters Set ParamValue = '" & txtLev2Privs &
_
"' Where ParamName = 'Level_2_Privileges'"
Call CurrentDb.Execute(ls_SQL, dbFailOnError)
End If