Link to home
Start Free TrialLog in
Avatar of thao-nhi

asked on

Access 2010 Inserting temporary variables into fields in a table

How do I insert  tempvar values into existing fields in a table? I have values from a form assigned to temporary variables through a macro. I would like to insert them to an existing table by way of a macro. Please elaborate the syntax when doing this in an insert query.

Avatar of IrogSinta
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Is this a one time data fix up?  How will you determine the correct value?  How will you determine which row to update?  Are you thinking you need to scroll through the recordset of the form and update one record at a time (not a good idea)?  

This type of bulk update should be done with a query if the value is constant such as populating a field with a default value.  If the value is calculated, you shouldn't be doing this at all.  Calculations should happen in the query when you retrieve the data.

Update YourTable Set SomeField = 0 Where SomeField Is Null;