Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / January 2008

Tip: Looking for answers? Try searching our database.

Transferring Field from Existing Table/limitations and change of d

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Inuchan - 12 Jan 2008 16:15 GMT
Thank you in advance for your help! I have two Excel spreadsheets that I
successfully imported into Access 2003 and created tables for. I need to add
the field from one table to the other, but there is not a direct match in the
relationship. The large table uses the Employee ID as the primary key. The
smaller table contains one field that lists a subset of these Employee ID
numbers (a selection of certain employees). I need to transfer this field to
the larger table, but I do not know how to tell Access to match up the
corresponding numbers (i.e., the large table lists all employees, but the
added field will only match up with those employees who appear in it.) In
addition, I need to change the value of the data in the added field from its
original number form to a "yes." Therefore, the "yes" would appear in the
added field in the record that corresponds with the appropriate Employee.
Any help would be greatly appreciated. I'm fairly new at this program and
feel that there has to be an easier way to do this than just adding a field
and hand keying all of the "yes" entries with the corresponding numbers.
THANK YOU!
Ken Sheridan - 12 Jan 2008 23:45 GMT
Add a Boolean (Yes/No) field to the larger table and create an update query
which joins the two tables on the Employee ID fields, updating the Boolean
field to True.  Because an INNER JOIN, which is the default join type in the
query designer, only returns rows where there is a match, only those rows in
the larger table where there is a matching row in the smaller table will be
updated.  In SQL the query would look something like this:

UPDATE [LargerTable] INNER JOIN [SmallerTable]
ON [LargerTable].[Employee ID] = [SmallerTable].[Employee ID]
SET [LargerTable].[YourBooleanField] = TRUE;

Ken Sheridan
Stafford, England

> Thank you in advance for your help! I have two Excel spreadsheets that I
> successfully imported into Access 2003 and created tables for. I need to add
[quoted text clipped - 12 lines]
> and hand keying all of the "yes" entries with the corresponding numbers.
> THANK YOU!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.