sql server - SQL Command help in VBA MSAccess -


i trying run update query command on form when statements true. updating field variable. have far run sql not seem work , can't figure out why.

any suggestions?

fldval = me.advhours  docmd.runsql "update dbo_employees " & _                     "set dbo_employees.advhours = '" & _                     fldval & "'" & _                     "where ((dbo_employees.empid)=" & empid & "));" 

extra closing ) - missing space before where (thats prolly ok)

all parentheses unnecessary, access has fetish them.

docmd.runsql "update dbo_employees " & _                     "set dbo_employees.advhours='" & _                     fldval & "' " & _                     "where dbo_employees.empid=" & empid & ";" 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -