Solved

How to auto-fill field in Access 2010 Table

Posted on 2014-09-03
5
6,124 Views
Last Modified: 2016-09-05
I have a table with about 1750 records, there is a field that is currently empty that I would like to populate with a name of a group called Sunshine.  Do not want this to populate going forward, just want to be able to have it filled in now.  Do not want to have to go to each record and put it in.  Any and all assistance, input would be greatly appreciated.
0
Comment
Question by:FreddyBass
5 Comments
 
LVL 34

Expert Comment

by:PatHartman
ID: 40301821
Create an update query to populate the value.  With no criteria, it will update all records.  If you want to update only some records, add criteria to select the records you want to update.

Here's a sample that joins two tables and sets the careplan in one table to the value found in the second but only where the careplan is empty:

UPDATE TEMP_PAfromPortal INNER JOIN tblCarePlans ON TEMP_PAfromPortal.CPID = tblCarePlans.CPID SET tblCarePlans.PortalCarePlan = [TEMP_PAfromPortal].[CarePlan]
WHERE (((tblCarePlans.PortalCarePlan) Is Null));

Open in new window

0
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 40301822
1. go to queries and choose new.

2. select the table you want to update.

3. change the query type to update.  When you do, you'll see a line in the grid appear called "Update to"

4. Pull down from the table into the grid the field you want to update

5. Fill in "Sunshine" on the "Update to" line under this column.

6. Execute/run the query.   it should tell you you have 1750 records to update.   If there are more records than just those, pull down additional fields and place criteria on them to get the records you want.   Just leave the "Update to" line blank for these.

 Note that you may want to leave it as a select query until you get all the records that you want, then switch to an update type.

Jim.
0
 

Author Closing Comment

by:FreddyBass
ID: 40301899
Hello Jim,

Thank you for your input and the way that you spelled out how to achieve solution was much appreciated.

Fred
0
 

Expert Comment

by:Karthik Shanmugam
ID: 41784595
Hi Jim,

The information provided here on how to fill series in Access was very useful. I was working one important data for which I had to use this option. I must say it saved a whole lot of time. Thank You so much
0
 

Expert Comment

by:Karthik Shanmugam
ID: 41784596
Hi Jim,

 The information provided here on how to fill series in Access was very useful. I was working one important data for which I had to use this option. I must say it saved a whole lot of time. Thank You so much
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now