D
DS
This updates a database that isn't the current one.
Does anyone see any problems with this or any way to make it shorter?
I have to place it in a lot of places so your advice and/or suggestions
are most welcome.
Thanks
DS
If Nz(DLookup("BackActive", "tblBackPath", "BackID=1"), 0) = -1 Then
DoCmd.SetWarnings False
Test2SQL = "UPDATE table1 IN '" & DLookup("BackName", "tblBackPath",
"BackID=1") & "' " & _
"SET table1.IDName = '" & Forms!Form1!TxtInfo & "'," & _
"table1.IDName2 = '" & Forms!Form1!TxtInfo2 & "'," & _
"table1.IDName3 = ' " & Forms!Form1!TxtInfo3 & "' " & _
"WHERE table1.IDNumber = 1;"
DoCmd.RunSQL (Test2SQL)
DoCmd.SetWarnings True
Else
End If
Does anyone see any problems with this or any way to make it shorter?
I have to place it in a lot of places so your advice and/or suggestions
are most welcome.
Thanks
DS
If Nz(DLookup("BackActive", "tblBackPath", "BackID=1"), 0) = -1 Then
DoCmd.SetWarnings False
Test2SQL = "UPDATE table1 IN '" & DLookup("BackName", "tblBackPath",
"BackID=1") & "' " & _
"SET table1.IDName = '" & Forms!Form1!TxtInfo & "'," & _
"table1.IDName2 = '" & Forms!Form1!TxtInfo2 & "'," & _
"table1.IDName3 = ' " & Forms!Form1!TxtInfo3 & "' " & _
"WHERE table1.IDNumber = 1;"
DoCmd.RunSQL (Test2SQL)
DoCmd.SetWarnings True
Else
End If