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.
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
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;
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
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;