I am trying to create a simple SQL command in a module.

docmd runsql not updating-15

I am trying to update a date field (enddate) in a table (tbl_employees) with the value of a text box (Termination Date) in a form. Private Sub Termination Date_After Update() Dim termdate As Date termdate = Me. The text box is already bound to another table (tbl_terminations), is this the problem?

Run SQL "UPDATE tbl_employees SET [enddate]=[termdate]" _ & " WHERE [tbl_employees].[Person ID]= me.person ID;" End If End Sub I get an "enter parameter value" msgbox for termdate. If the table already has a date in it, I don't want to overwrite with a null value (hence the IF statement).

However, if you are already delineating a string using one of the quotes, then if you need to delineate another string, you need to use the other quote or double up on the quote.

), suspecting that maybe temporary data in table have to refresh for database to see it, or something.

Thanks again for all you help..you can see I am fairly new to VBA.

A string expression that's a valid SQL statement for an action query or a data-definition query. INTO, UPDATE, CREATE TABLE, ALTER TABLE, DROP TABLE, CREATE INDEX, or DROP INDEX statement. The data we want to be changed can be specified by some conditions. Run SQL, the performance is lower, because a step appears in the path of our query that does not exist when using Current Db. We use the SQL UPDATE statement in MS Access when we need to replace some data in all the fields of some columns of our table or when we want to change the specific record, but it is located in many tables at the same time. Run SQL calls the user interface to check all parameters, which causes a warning about the access level, and then these parameters are sent to the database handler.My table is set up like this: Worker_Code - this is the workers employee ID number Worker_Time - this is the total amount of time spent on task Each worker will clock in and then a timer will start tallying the total amount of time they are on task.I am then hoping to use the SQL statement to pass this amount of time to my table field Worker_Time at set intervals so I can gauge output per hour. I've been stuck on this one for some time now so I truly do appreciate your willingness to help me out. The changes don't produce the error I was receiving but they also aren't updating the table. It is pretty basic..the most part I have my form that runs the clock and calculates total time. Robert The code I was originally trying to run was an UPDATE query, but my code stops on the SQL= statement. Robert Public Sub Update Full Path() Dim SQL As String SQL = "UPDATE tbl Runsheet SET tbl Runsheet. So, I tried running a simple SELECT * FROM tbl Runsheet. The article could have been more explicit regarding the quotes since the mistake is very common. If doing a select query dynamically then you would have to first create the querydef to open a select query. I would create a query where I would concatenate Path, Vol and Pg and show Full Path in this query.