Match Field Based On Table

Jan 4, 2006

Hello all,

Happy New Year.

Hope you ca help with the following.

I have 2 tables in access. One is a table with the us state abbreviations.

I have another table, one of the fields is an address field, e.g.

SOQUEL CA 95073
SOUTHAVEN, WA 98671
SOUTHBURY, CT 06488
SPENCER IA 51301
SPOKANE, WA 99201
SPRINGFE VA 22150

I would like to create a query, joining these two tables together so that the query can give me the 2 state abbreviation e.g.:

Address field/ Abbreviation field
SOQUEL, CA 95073/ CA
SOUTHAVEN, WA 98671/ WA
SOUTHBURY, CT 06488/ CT
SPENCER, IA 51301/ IA
SPOKANE, WA 99201/ WA
SPRINGFE, VA 22150/ VA

Is this possible?

Thanks for your help,

View Replies


ADVERTISEMENT

Queries :: Match Based On Multiple Values Within One Field?

Sep 22, 2014

For my study on academic research I need to match patents that refer to academic research as prior work with the actual prior work.

I have two tables (see attached images below).

One regarding AcademicPublications (AP), which is neatly organized with title, year, journal, volume, pages, first author, etc... 480,000 rows

One regarding Patentswhere all this information is hidden within one field, in the most messy way possible... for instance, a field could have:

Quote:

Sugita et al, "Nonsurgical Implantation of a Vascular Ring Prosthesis Using Thermal Shape Memory Ti/Ni Alloy (Nitionl Wire)," Trans. Amer. Soc. Artif. Intern. Organs, vol. 23, pp. 30-34.

or

Quote:

Willingham et al., Cell 13, 501-507 (1978).

Or many other ways.

I want to create a new table that is set up like this:

Patents.PatentNumber | AP.ID | Patents.Reference | AP.Title | AP.Year | AP.Volume | AP.PageStart

The question is: How do I match different fields from one table on one field of another and make it return another field (the ID)? Some references are too horrible to match, but I need as many as I can get.

I can imagine two queries would give me the bulk:

A match in [Title] AND [Year]

A match on ([SourceTitle] OR [AbbreviatedSourceTitle] ) AND [Volume] AND [Year] AND [PageStart]

I understand that I have to make use of the Like "*"&[value]&"*", but how do I make it return the matching ID?

View 10 Replies View Related

Queries :: Update A Field If Find A Match In Another Table

Jun 29, 2015

I have a table Billing_Temp that I need one field updated if I find a match in another table Random_Temp. I runt the query and it prompts for "Enter parameter value: Random_Temp.peopleID... what could be going on? Both tables have a field called peopleID and always Billing_temp has many more records than Random_temp:

UPDATE Billing_Temp SET Billing_Temp.audited = -1
WHERE (([Billing_Temp].[peopleID]=[Random_Temp].[peopleID]));

View 1 Replies View Related

Form Field To Auto Pull Data From A Table When There Is A Match

Feb 5, 2013

I have built a nice database that has a form to enter data which logs in product received, there is a combo box on the same form that is linked through the query builder to auto populate the names from the contacts info table (the receivers of the product received) the contacts info table also contains information that is specific to each name such as locations.

As of now I have created a command button that brings me to the form that shows the information fields I need specific to a name, once I get that I have another command button to bring me back to the main form. How to create an additional list box on the main data entry form so as when the name is entered the new list box or text box (which is best?) will auto populate the information I need on one form instead of going back and forth.

Example:

Requester Name [ auto populate name ] currently linked to contacts info table (working)

(New field) Preferred Location [ need to auto populate location ] from the contacts info table (how do you pull locations specific to a contact name from the same table?

View 3 Replies View Related

Tables :: Update A Field In One Table Based On Status Of A Field In Another Table

Aug 2, 2013

I have started work on a database to track the many (several hundred per annum) projects my company undertakes. A 'main' table lists projects, their fees, their key dates, their project numbers, etc. I have created another table for tasks. Each task is assigned to a project (via the project number), and may be 'open' or 'closed'. I have separated the tasks table from the projects table as there may be several different tasks for each project. It is also good to keep a record of the tasks.

I want to prepare a report from the projects table that lists projects IF they have any open tasks.

In my mind, this means 'If a task, with the corresponding project number, is open, put a 'Yes' in the 'Tasks open' field of the Projects table.'

View 7 Replies View Related

Update OnHandQty Table Field Based On Qty Field From Another Table / Form

Oct 30, 2012

I have a table called Inventory (table1 - PK=INVID) that contains all inventory ID numbers and descriptions. I have another table called Inventory Transactions (table2 - FK=INVID) that gets updated through a form. When a new transaction is made in table2, I want the transaction amount to get added or subtracted to an OnHandQty field in table1. I tried having table2 (transaction table) as the main form and then table2 as the subform, but I couldn't get table2 to update.

View 5 Replies View Related

Tables :: Auto Populate Field Based On Answer Of Another Field In Same Table

Feb 28, 2013

Within my table if Field 1 has an answer of Self (from drop down), then, I would like Fields 6-12 to auto populate; however, if Field 1 does not have an answer of Self, then leave Fields 6-12 blank.

I am not quite sure how to lay this out. I am using Access 2010.

View 8 Replies View Related

Make Field Auto Populate Based On Value Of Field In Another Table

Mar 4, 2008

I'm creating a database that keeps a track of questions and scores.

The questions in the database need to be dynamic and are changed frequently.

I have a scorecard table which keeps a record of scores and the applicable question at the time the record was saved. I need to do this because in 6 months time we may want to provide feedback. As the question may have changed we need to be able to refer back to what the question was.

I want the question field in my scorecard table to populate with the value in my question table.

I have tried a number of things including setting the question field in the scorecard table to a lookup based on the following query:

SELECT tblQ1.Q1
FROM tblQ1;

This works however only as a list or combo box. I don't want the user to have to select the question. I want it to auto populate, is this possible?

View 1 Replies View Related

Modules & VBA :: Updating A Field In A Form Based On Another Table Field

Sep 13, 2013

Using Access 2010. Fairly new to automation and macros.I have two tables (tblProductReceived and tblBins) and a form (frmProductReceived).A field in tblBins corresponds to a location the bin is at (named BinLocationID) and the tblProductReceived table tracks product that a specific bin has received.

What I need is for the tblProductReceived field PRLocationID ([tblProductReceived].[PRLocationID]) to be automatically populated with where the bin is at ([tblBins].[BinLocationID]) when selecting a specific bin in the form (frmProductReceived).

View 1 Replies View Related

Tables :: How To Make Calculated Field Based On Field In Another Table

Jun 18, 2014

Table1 contain Two fields (3Months) and (6Months)

Table2 contain Two fields (3Months) and (6Months)

the table 2 is the source of a form that will let the user change the numbers. table 1 should change Date1 and Date2 Fields based on the two fields (3months) and (6months) if i want to make a lookup wizard it should be changed manually and if i make a calculated field i can't find other tables in the expression builder

View 1 Replies View Related

Tables :: Autopopulation Of Field From Another Table Based On Another Field Criteria

Dec 5, 2012

I have a main table which is autonumbered on unitid, I have another table which is linked via the unitid which holds items purchased for the main table, so the second table is a subform of the suppliers and will have multiple entries of the same unitid. What I would like to do is when an item is entered into the second table, check the main table to see if it exists, if it does populate the unitid field with the unitid from the main table, and if not exist create a new record in the main table with the next unitid number.

This in essence is what I want, bearing in mind that the tblinvoices is a subform and the tblmain is not open.

If ([tblinvoices]![Unit] = [tblmain]![Unit]) Then
[tblinvoices]![UnitID] = [tblinvoices]![UnitID]
End If

View 3 Replies View Related

General :: Autopopulation Of Field In Table Based On Entry In Second Field

Jul 22, 2014

Please see attachments.

POST.zip (384.0 KB)
database.zip (58.8 KB)

View 4 Replies View Related

Pulling A Field To Match The Min Field That Is Queried

Nov 30, 2005

Let's see how well I can explain this. I'm sure the issue is much simpler than I know but my knowledge is limited as this is all self-taught.

I have two tables:

Table 1:
Category Name
Part Name
# used per house

Table 2:
Part Name
MFR Name
Part Number
Initial Cost
Rebate %
Final Cost

In my form table 2 is the subform as there are multiple manufacturers that we get price quotes from for every part that we use. I'm trying to query for the minimum price for each part but I cannot get it to give back the MFR name that has the minimum price. I currently can only get it to show the minimum price for each part but that doesn't tell me which MFR it is that provides that price.

Also, Final Cost is just the Initial Cost multiplied by the Rebate %. Is there anyway to make it be auto-populated within the table. Currently I'm just running a text box on my form that multiplies the two fields but that leaves my Final Cost field in the table blank obviously.

I have a few other things but figure I'll start here lol. Any help would be appreciated

View 2 Replies View Related

Forms :: Access 2010 - Form Shows Similar Match In 1 Table - Alter Another Table?

Dec 16, 2014

I have two tables (Access 2010). One with a list of names (List1) and another with a very similar list of names (List2), but they differ in very small ways. For example, List1 might have John Smith, and List2 would have Smith, John L.; and Smith, John. List2 also has a unique ID associated with these names that I need to append to List1.

I need to design a form that will allow me to look up names in List1, and have it return all names that are similar in List2. I then need to be able to choose with record in List2 matches with the List1 entry (based on a few other columns in List2, such as birth date) and have the form add that unique ID to the List1 record.

PS: I am using Access 2010

View 1 Replies View Related

Update Table Field Based On Another Field.

Mar 3, 2008

Ok. I've got a table named SIPATable and some of the fields contain summed values. Let's say for instance I have a field named "GaDRaw", which represents a raw score. now...I need to update a field called "GaDPer", based upon the value in "GaDRaw". So...If "GaDRaw" <=16, then I would want "GaDPer" to be updated to = 35. Further, if "GaDRaw" = 17. then I want "GaDPer" to = 37. and so on....

I think it's an If Then Else statement, but not sure how or where to place it. Id like it to be as code under a command button, and update the table all at once.
Any help would be appreciated.
Thanks in advance,
Freud52

View 7 Replies View Related

Automatically Set A Field Based On A Field In Another Table

Aug 12, 2005

I have two tables, each has a "status" for a project. In the first table there is only one instance of each project name, in the second table there may be more than 1, will always have the same name but may have a different "Status" (field).

I need the Status field of the first table to be set to "Assigned" if ANY of the records in the second table pertaining to that project are set to "Assigned".

Can I do this with my table or will I need to do it with a query/form combination?

Thanks,

View 4 Replies View Related

Find Duplicates That Don't Match Single Field

Jun 5, 2007

Hello all,

I am sure this must be simple, but I can't get my head around it.

I have a query that looks at client bank account numbers, and finds duplicates.

There are a LOT of duplicates, because we have several accounts for the same person.

What I would like to do is find all the records where the account number and sort code match, but where the account NAME is different.

I am trying to find any records where the same account number is being used on more than one account.

All the fields are in a single table.

This is what I have so far, which just finds duplicate sort codes and account numbers;
SELECT CPL_ACCOUNT.ACCOUNT_NUMBER, CPL_ACCOUNT.SORT_CODE, CPL_ACCOUNT.BANK_NAME
FROM CPL_ACCOUNT
WHERE (((CPL_ACCOUNT.ACCOUNT_NUMBER) In (SELECT [ACCOUNT_NUMBER] FROM [CPL_ACCOUNT] As Tmp GROUP BY [ACCOUNT_NUMBER],[SORT_CODE] HAVING Count(*)>1 And [SORT_CODE] = [CPL_ACCOUNT].[SORT_CODE])))
ORDER BY CPL_ACCOUNT.ACCOUNT_NUMBER, CPL_ACCOUNT.SORT_CODE;


Thank you!

View 1 Replies View Related

Show All From Left Table Who Match Right Table?

Mar 22, 2006

The part that I'm a little lost on is the WHERE part:

Table1
-----
UniquePersonNumber
blah
yadda

GruntSounds
-----
ooga
booga
blargh

HowSpeak (1 to many relationship with Table1)
-----
UniqueNumber (lookup to UniquePersonNumber field in Table1)
Sounds (lookup to GruntSounds table)

The part that I'm a little lost on is the WHERE part -- the "matching" portion of the FROM was shortened for brevity:
SELECT blah, yadda
FROM Table1 LEFT JOIN HowSpeak ON "matching UniquePersonNumber"
WHERE
"a person makes both an ooga sound and a booga sound but doesn't make a blargh sound"

I hope that I gave enough information from this fictional project to make it clear how I'm attempting to structure the WHERE in the statement.

View 3 Replies View Related

Autopopulate A Field In Table Based On Another Table

Mar 24, 2005

Hello everyone. How do I go about automatically inserting a date from one table into another table. This are my tables:



tblPAF (Personnel Action Form)
PAFNo
EmployeeNo
Date
Department
Division
Salary
Comments



tblBenefits
BenefitsNo
EmployeeNo
Date
BenefitType
CoverageDate

Every time an employee’s salary or benefits changes we fill-out a PAF (paper format) on it we write all the changes. In my PAF db form I’m thinking adding a command button to open my Benefits Form. Once my Benefits form is open I don’t want to renter the date that was entered in the PAF form I wanted to automatically insert that same date. Hopefully I made myself clear.



Thank you for your assistance.



HR

View 1 Replies View Related

Forms :: Reformat A Field To Match External Data

May 29, 2013

I am attempting to use some external data to populate fields in my DB. I would like to reformat the ProductID in my DB to match a ProductName coming into my DB. We have many products that have 2 pieces. If the product does have two pieces, the external database has two ProductNames that look like this:

0000967
2000967

I would like my database to be able to pull information for each of these 2 part products (they will be displayed as one product in our DB, never to be seperated). I have a form that gives the exact measurements of the first piece by using the ProductName and matching my ProductID (0000967). I would now like to write a little VBA to populate some fields on the forms that are pulled from 2000967.

something like:
Forms!Product!txtField2 = DLookup("[FieldName]", "TableName", "[ProductName] = Forms!Product!ProductID")

The issue is that I need to only get the trailing 6 digits of my ProductID and add a 2 at the beginning. Is there a quick Format syntax I could use to accomplish this?

View 14 Replies View Related

Match The Sum Of Column Values To Another Table

Jun 12, 2015

I am using access 2010. I have "classlevel" table with 2 columns-Class and Value1 .Value1 column has numeric values that i ll input from webpage (webpage to ms access connectivity).I want to sum the values of column "Value1" and i have another table-"Volume" which has 2 columns "VolumeLevel" and "Value2". So i want to match the sum that i calculated from first table-"ClassLevel" with the "value2" column in "Volume" table and get the corresponding "volumelevel" column value from that table and there is a third table that will get this volumelevel value.

There is no common column to join these tables.

Classlevel-

Class Value1
Class 0 3000
Class 1 2000
Class 2 300
Class 3 400
Class 4 500

Volume-

Volumnlevel Value2
Vo 0
V1 5000
V2 10000
V3 30000
....upto V10

View 1 Replies View Related

Queries :: Sort By Percentage Match To Multiple Field Search

Mar 19, 2014

We're trying to create a database to read quotes from a system based on changes made to components.

We have the database set up to store the quotes happily. We're pleased with the input forms and data capture however we are struggling with a query to get useful data from the database.

I have a main quote data table listing all the required fields such as costs and supplier data for the quotes, a table storing components that may be changed as part of a quote and a table listing alterations that could be made to these components. Each quote could have a number of changes made to a number of components. All these changes are stored in a changes made table which lists the quoteID, ComponentID being changed and The AlterationID of the alteration being made.

I want to be able to input a varied amount of changes via a form and be shown a list of all quotes where at least one change matches. I've managed to get this far using a lot of OR statements however the complexity is introduced as we need to sort these by an extra column produced by the query displaying the percentage the changes made in the quote match the search input.

If a quote appears matches my changes and there are no other changes on the quote - (100%)

If a quote matches all changes I have input but I input 5 changes and the quote has 6 - (5/6 - 83%)

If I input 1 change and a quote matches but has 8 changes on the quote - (1/8 12.5%)

View 2 Replies View Related

Trying To Update Field Based On Other Table

Jul 25, 2006

I have the following situation.
Table 1:
------------------------
Primary Key
Name
Secondary key

Table 2:
------------------------
Primary Key
Age
Secondary Key

*****************************
This is just an example. The first table is totally populated. The second table does not have the secondary key assigned, but otherwise is populated. In additon, some of the records in Table 2 do not have a matching entry in table 2.
I would like to be able to update table2, populating the Secondary Key field in order to allow me to delete the Primary Key fields. The Primary key was assigned by somone else who created the db, and makes no logical sense, i'm trying to replace it with a key that can be used more easily. Any help would be greatly appreciated.

Kevin S. Jones

View 1 Replies View Related

Multiple Match Conditions In A Unrelated Table

Jan 31, 2007

Hi All,

My database has two tables:
1. Complete Address Data
2. Address conditions.

Table 1. has verbose customer [address] data like 11 smith st, 14 Kent Rd etc.
Table 2. has [std] address conditions, ST, RD, Street, Road etc.

How can I query ALL records by field [address] in table 1 by using ALL [std] address conditions in table 2?

The address conditions can occur anywhere in the [address] string, so I was thinking about maybe a CONTAINS condition, but I'm not sure

View 2 Replies View Related

Forms :: SQL To Add New Record Form One Table To Match Another

Mar 3, 2014

I have a form that I need to add a new record using embedded SQL rather than just binding the form and using an automatic new record. My form will display the needed random number in a textbox and that needs to be my new record number. So I need first to check to see if that number already exists as a record number then add it if it does not and either way insert or update a set of additional fields. Something like:

DoCmd.RunSQL "SELECT * FROM tblExceptions WHERE ReconciliationID = " & Me.txtReconciliationID
Psuedocode: IF Record Exists UPDATE Field1 and FIELD2
Else Create record and insert VALUES into Field1 and FIELD2
End If

View 4 Replies View Related

General :: Match Sum Of Column Values To Another Table

Jun 12, 2015

I am using access 2010. I have "classlevel" table with 2 columns-Class and Value1 .Value1 column has numeric values that i ll input from webpage (webpage to ms access connectivity).

I want to sum the values of column "Value1" and i have another table-"Volume" which has 2 columns "VolumeLevel" and "Value2". So i want to match the sum that i calculated from first table-"ClassLevel" with the "value2" column in "Volume" table and get the corresponding "volumelevel" column value from that table and there is a third table that will get this volumelevel value.

There is no common column to join these tables.

Classlevel-

Class Value1
Class 0 3000
Class 1 2000
Class 2 300
Class 3 400
Class 4 500

Volume-

Volumnlevel Value2
Vo 0
V1 5000
V2 10000
V3 30000
....upto V10

Answer that i am looking for is V1 as sum=6200 lies between 5000 and 10000 so its V1.

Table 3-

Volume-
V1

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved