Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to auto-fill field in Access 2010 Table

Posted on 2014-09-03
5
Medium Priority
?
9,401 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 40

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 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 2000 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 Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

772 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