Comparing Similar Columns In Multiple Tables.

Jun 1, 2007

Hi Everyone,

I am trying to compare/relate two columns in two tables to each other in access, where the results shoud return similarities among both colums from both tables.Even if one column has some parts of it.
Example;
T1 T2
Name Members
John Johnson.kay
mike mike
Daniel Danielson.mic
Richard Richardson

I tried; "like[T1.Name]*" in the criteria section of Members.Need Help pls.

View Replies


ADVERTISEMENT

Modules & VBA :: Comparing Rows / Columns In 2 Tables

Jun 25, 2013

I have 2 tables and 1 query. Table dbo_RepOrderItem includes columns:

RepId
OrderNumber
Item
ShipDate
SerialCardID

Table tbl_LBP Sales Location Num includes columns:

Location ID
Rep Region Code

What I've been doing so far through my code is working through a query 'CalculateTotal' which looks up a structure number (Which I enter through an InputBox) from table dbo_RoicStructure, gets the SerialCardID from the same table and collects the associated RepId,OrderNumber,ShipDate from table dbo_RepOrderItem and checks that the OrderNumber(s) returned exist in column Location ID in table tbl_LBP Sales Location Num. It also checks that Rep Region Code is not equal to 'INT' nor 'inte'.

My code for all of this works just fine. What I am trying to do now is simplify my results. I want to only return rows that do not have the same Item, OrderNumber, and RepID.

Fore example:

OrderNumber: Item: RepID:
11 3 1
12 3 1
11 4 1
11 3 1
14 7 4
16 8 8

It would now count 5 existing RepID(s) rather than 6 because it would have deleted the duplicated row. This should only be deleted in the user's table not the actual table.

And speaking of the user's table. What I have been doing so far is only returning the results (right now it returns 6, which as I explained above is incorrect) but I also want to return a table or query that would should the user the work behind the returned number.

This is my code:

Option Compare Database
Option Explicit
Sub SearchPartNumber_Entered()
Dim txtPartNumber As Variant
Dim rst As Recordset
Dim rstt As Recordset
Dim u As Variant

[Code] ....

View 10 Replies View Related

Modules & VBA :: Combining Multiple Tables Of Similar Type?

Jul 17, 2014

I have a database which is importing several Excel workbooks, each with multiple worksheets. Every workbook has 20 worksheets, with the same 20 worksheet names. When they are imported they come in as one table for each worksheet, named tblWorkSheetName_X with X starting at 1 and increasing for each worksheet brought in with the same name. So if the worksheet names are A-T I have tblA_1 through tblA_6 and likewise for B - T.

I would like to combine all of the tables which come from similar worksheets into one table (one table per name).

I.e. I want to combine the data in tblA_1 through tblA_6 into a singular tbl_A and likewise for tables B through T. So in the end I will have one table for each worksheet name A-T. t how to code this successfully?

View 14 Replies View Related

General :: Comparing Data From Multiple Tables

Nov 5, 2013

We have an "item" table that contains information specific to an item (the item number is unique); and multiple "production line" tables. There is a relationship between the Items table and the Production Line tables (all 8 of them). Each item can be entered on 1 or more production line tables because one item may be produced on multiple lines and the settings vary based on the line they're produced. When entering an item in the Production table we MUST make a selection from the Item table.

Now, what I want to do is identify which item number(s) from the Items table does not have a specific field entry in ANY of the Production Line tables.

View 9 Replies View Related

Comparing To Columns

Jun 15, 2006

If I have a date column and another column with another consistant date, Can I make a criteria to compare one to the other. Ex:

END_DATE Today's_DATE
06 Feb 05 15 Jun 06
12 Feb 05 15 Jun 06
01 Jan 06 15 Jun 06
26 Mar 06 15 Jun 06
18 Aug 06 15 Jun 06
28 Dec 06 15 Jun 06

Can I make a criteria that will only show the END_DATE data that is before Today's DATE? Does it need to be a new column or can I place it in the criteria of one of these column.

View 1 Replies View Related

Searching Across Multiple Tables With Same Columns....

Dec 2, 2005

Ok,

I have three tables that are named different, but have the same column names, but different data in them. The data in each table is linked by a master table that has a primary key.


What I need is a way to make a form with a box where I can search on a value that could be in any of the three tables and then the associted information from the site will display in the above boxes.


(Site Master Table contains all site information and the primary key)
(The three tables are sales order information. Stage Only table, Install table, and srop ship table)

Any ideas?

View 1 Replies View Related

Combine Multiple Tables With Some Identical Columns

Aug 22, 2014

The problem I'm having is that i need to combine 12 tables with multiple columns and not all columns have the same headers. So if a column is present it should be updated, if not it should be added.

The end result should be one column with all records and all columns that exists in all 12 tables.

The tables have an identifier that is the same for all columns (supplier reference).

Table 1 has 56 columns
Table 2 has 42 columns (of which some have the same header)
....

(--doing every column manually is something i would like to avoid if possible --)

View 5 Replies View Related

Linking Columns To ID Number In Multiple Tables

Nov 8, 2012

I am working with a large database of 8,000+ entries. We have five tables in this database, but mainly use three of them. The main table is "OAKE Main Table" which is basically a list of all members our organization has had. Each member has accounting data linked to their member ID number which has been generated by ACCESS, and can be accessed or edited by clicking on a sub table next to each member. The accounting data that has been manually entered in the OAKE Main Table can be found in the Accounting table.

Here's my issue. I need to be able to extract a list of transactions from this accounting table since January 1st. I can do this no problem, but all I get is the member ID and the accounting data. How do I get ACCESS to include the member ID's first and last name? or maybe even the first, last name, address, city, state, zip, etc so that I can get a list of people who have made donations, for example?

I'm assuming this will have something to do with the relationships we have set up in our table. Here's a picture of it. I have no clue how to make this work.

View 8 Replies View Related

Tables :: 2 Similar Tables / One Takes Too Long To Append Data

Jul 19, 2014

I have being playing with ms access but I really don't know much about it or databases in general.I have created a very simple database to gather twitter following/followers data for research purposes.One table (table01) has a field for the "boss" user (=the user who I gather data for), another field for "client" (=bosses followers or friends).Both fields are numeric and contain the users id's.In order to distinguish if the link is follower or friend there is a third field, called type which can be either 1 (=follower) or 2 (=friend).So the data would look like this:

boss - client - type
12345, 67890, 1
12345, 54321, 2

If user with user id 12345 had a follower (type 1) with user id 67890 and a friend with user id 54321...In order to avoid getting duplicate rows I also added a unique identifier which is of the form boss_id-user_id-type.So the above row looks like this:

12345-67890-1, 12345, 67890, 1
12345-54321-2, 12345, 54321, 2

That works just fine.For several reasons I also needed data of the form source - target.So I also made another table (table02) of this form.

67890, 12345
12345, 54321
...

In table 2 you don't need the "type" field since the position of the user id shows the type of relationship.Still, you need a unique identifier in order to avoid duplicates, so I added on with the form: source_id-client_id..So table02 lookes like this

67890-12345, 67890, 12345
12345-54321, 12345, 54321
...

Both tables also have a date/time stamp for each line.As you can see, table01, having also a type field is bigger than table02.The problem is when I try to append data, exactly the same data in both tables.Appending data to table01 is ok, while appending data to table02 (which is smaller, having one less field) takes a really long time, maybe 10 times as long as appending data to table01.To make sure that no query's are causing the problem I have tried first creating temporary tables with the data to be appended, no duplicates, nothing that would cause the database to make extra calculations and used a simple update query with no filters to append data.Still I get the same result, table02 takes a very long time to finish while table01 finishes in no time.

View 2 Replies View Related

Queries :: Multiple Similar Table Into 1 Query?

Sep 11, 2013

I'm doing a database for a friend and the challenge I have is there will be a lot of attachments going into this database, which will hit the 2gb file size limit in no time.

My solution is have each year of attachment in a separate databases and link them to the main database. The attachment are tax documents.

They table layout is all the same. It will be like this:

TaxYear, ClientID, 1040, 1040NR, 1040X, etc.....

TaxYear will be whatever year the database is designated and ClientID is the client for that particular year. The same client can shows up in multiple years.

I have thought of inserting each table in a form, but when a new year come, the form will need to be adjusted. And it will has empty field if a client skip a year or two.

View 6 Replies View Related

Keep 5 Similar Tables Updated

Apr 2, 2008

I have 5 tables which comes from different departments in our company.
All of them have the same key "project no" but hold different information in other colums.
As a starting point I have secured that they all have same no. of records meaning all "project no" are in all tables but some table might not contain other information in that record than the project no.
I have put them into a quirie and on a form I am able to look at all data from all 5 tables.
I have linked them one to one and it works fine untill I add a record to one of the tables. Afterwards I am not able to write into fields from other tables because there is no automatic creation of the record in the other tables.
Please How would this be best/easiest to make for me. ?
The reason why I have to keep the 5 tables is that regular updates are avaiable form any of them.

Appricate any comments which can make me any progress.

View 3 Replies View Related

Merge Similar Tables

Jun 5, 2007

Hi there, I'm quite new to Access.I have two tables which have very similar Data, but laid out differently. The main similarities are things like FirstName, LastName, Company. What I need to be able to do is merge the two tables together into one super table. I've tried linking FirstName with FirstName and LastName with LastName on both tables, and running a query, so I can check for duplicate names. But all that brings up is a list like this:Steve Smith Steve AbrahamsSteve Smith Steve McDonaldSteve Smith Steve PerrySteve Smith Steve Vere(those columns would be Old FirstName, Old LastName, New FirstName, New LastName)There are fields in the old table that are not in the new, and vice versa. But the core fields are labeled the same. What's the best way to proceed here?Cheers,Hob

View 5 Replies View Related

Find Similar Data In 3 Tables

Mar 29, 2008

I have 3 tables, with the same field in each of the three tables. I need to find numbers (within those fields) that are similar in all 3 tables. If a number appears in all 3 tables, then all the data for that number need to be pulled from each table and placed in one row, all corresponding to that one number.

I can get this to work for 2 tables, using a query, but not three.

View 7 Replies View Related

Joining Tables With Similar Fields?

Sep 18, 2015

How would I go about joining tables with similar fields? I currently have three tables that show standings of teams (East, Central, and West). They all have the same fields:

East
Team Name
Wins
Losses
Ties
Points For
Points Against

Central
Team Name
Wins
Losses
Ties
Points For
Points Against

West
Team Name
Wins
Losses
Ties
Points For
Points Against

How would I combine them in a query so that all of the data from the tables are compiled into one table:

Overall Standings (East/Central/West)
Team Name
Wins
Losses
Ties
Points For
Points Against

View 1 Replies View Related

How To Join Tables With Similar Values In Query

Apr 5, 2006

Can someone please help with the following:

I am trying to join two tables in a query. One of the tables has only the fullname while another has only the surname (this table is imported from an external database). I need to be able to match the two tables up. Can anyone please suggest how to do this or even if this is possible.

Thanks

View 6 Replies View Related

Tables :: How To Not Allow A New Record To Have Similar Values As Existing One

Jul 29, 2015

I am having an issue with duplicates in my table. I have a table, called "Part Mods", that has about 12 fields in it. the first 2 of them are "Mod" and "Part Number". I have a form where someone can insert data into this table and what i want is for them to NOT be able to insert a record with the same Mod/Part Number combination of an already existing record. I have "indexed" turned on but I am pretty sure that is for every field.

View 3 Replies View Related

Queries :: Consolidate Multiple Columns Into Two Columns

May 14, 2014

I have a MS ACCESS 2010 database with a data table which i am trying to create a query from. I have 6 columns of data( one with an ID Field and 5 Name Fields). Below i have made examples of how it first appears as a simple query and the second will show you what i would like it to look like.

What the simple query looks like: [URL] ...

Second what I want the query to look like: [URL] ....

View 2 Replies View Related

Tables :: Similar Option To Multivalue Lookup Fields

Apr 16, 2013

Is there another field that can be used beside the lookup field in an Access table? I am currently using the lookup field as a multivalued lookup field and I am limited to the the things I can do with it when creating a report or a query on that field. Is there a similar field in Access 2010 that has the same look as a lookup field and allows for multiple values to be selected?

View 4 Replies View Related

Comparing Multiple Dates And Times In A Query

Mar 8, 2007

Hi there,

I'm trying to 'rank' x5 categories that overlap. To determine the ranking i'm utilising date & time (if the dates are equal). I've managed to do this comparing x2 of the categories but struggling with the logic for x3,x4 & x5 categories

I have the data in separate tables by category date & time and in one large table.

Hoping someone can assist as my head is starting to hurt.

Thanks

View 4 Replies View Related

Verifying Records By Comparing With Multiple Standards

Jul 2, 2007

Okay that Title sounds confusing, but so is this task. Let me explain what I'm trying to do:

I work for a property management company and I'm trying to build a database that will allow me to catalog the inventory of furniture in several (thousand) rooms in several different buildings.

There are several types of rooms on campus all with different requirements. I want to eventually create a "standard" inventory list for every TYPE of room and then compare the actual inventory of each room to the standard inventory of each TYPE of room to make sure it is correct. The problem is that every room has several possible acceptable standards.

I was thinking that for each TYPE of room I could have several possible standards and then run a query that returns all rooms that do not match any of their standards. Does this sound doable? Any suggestions for how I might run that? Am I in way over my head? haha

View 2 Replies View Related

Tables :: Merge Duplicate / Similar Records Into 1 Record In Access 2010

Jun 9, 2014

Is there a way to merge duplicate/similar Access 2010 records into one record?

I have an Access table with 1,000 duplicate records, although they are similar and not exact duplicates. As you can see below, some records contain information that other records do not. Yet, the primary key is the same for all duplicate records. I want to find a way to merge data from filled cells of duplicate records into empty cells for each duplicate record. I do not want to concatenate the data (i.e. combine last and first name, etc.). I only want to fill empty cells if there is a match for it in a duplicate record. I will delete the newly exact duplicate records later. Short of correcting the records by hand.

Example

Code:
LastName FirstName SSN Address Phone Email
Doe John 123-45-7891 123 Anywhere St. NULL john(at)gmail.com
Doe John 123-45-7891 NULL (123)456-7890 NULL

Desired Result

Code:
LastName FirstName SSN Address Phone Email
Doe John 123-45-7891 123 Anywhere St. (123)456-7890 john(at)gmail.com
Doe John 123-45-7891 123 Anywhere St. (123)456-7890 john(at)gmail.com

View 2 Replies View Related

Comparing Tables

Aug 17, 2006

I have two tables: -

1) Sales data
2) Claims data

I want to anaylse Premium (contained in the Sales Data Table) against Claims (contained in the Claims Data Table). The result I want to achieve is to show a loss ratio (Premium / Claims as a %). I need to show this on a per policy basis (each Table has a Policy Number Column).

Im new to Access and do not know how to go about this.

View 3 Replies View Related

Comparing Tables

Jul 12, 2005

Hi,

I have imported data from an ERP system into an Access table. This big table contains information about invoices processed last month. 2 of the columns are currency code and payment batch code.

Actually, there are rules that accountants should follow, but they can make errors. We would like to find those error using this Access database.

One rule is that only predefined payment batch codes should connect to a
currency code.

My idea was to create another table, where controllers are able to type in these rules like

EUR CIE
USD CIU
HUF BKH

This table has only 2 columns: currency code and payment batch code and no primary key has been defined.

The 2 tables were joined with the currency code and a query printed only those transactions where the payment batch code from the big table <> the payment batch code from the new table. This shows where accountants made an error.

This is the query:

SELECT [475 Master].*
FROM Tbl_Pmt_Btc INNER JOIN [475 Master] ON Tbl_Pmt_Btc.Cur_Code2 = [475 Master].Currency
WHERE ((([475 Master].Pmt)<>[Tbl_Pmt_Btc].[Pmt_Btc_Code]));

475 Master is the big table, Tbl_Pmt_Btc is the new table that can be modified by the controller.

This worked until more than one payment batch code were assigned to a currency code.

EUR CIE
EUR CIU

It seems that Access can use only one of them.

Can you please advise what to do in order that Access takes both rows into
account and the query prints those transactions booked in EUR where the payment batch code are neither CIE nor CIU.

Is there a simple solution without any programming?

Thanks,
Peter

View 2 Replies View Related

Need Help Comparing Tables

May 17, 2005

Hello - I am new to Access and don't know VB.

I am trying to compare 2 tables that each contain the following information:

Fields:
Document Number
Date
Changes (Amendments, etc.)

I would like to see the following on a report:

A - If a document number is on Table 2, but not on Table 1, show these on a "missing documents" report.
B - If a document number exists on both reports, however the dates do not match. Example: Document 123 is on Table 1 with a date of 1/1/1999 in the date field. Table 2 contains the same document in the document number field, however the date field contains 2/15/2005. SHow these on a "Date Differences" report.
C - If a document matches on number and date, however the changes field does not match.

Ultimately, I would like to add other fields to compare as well.

Hope this makes sense to someone out there!

Thanks!

View 1 Replies View Related

Comparing Two Tables.

Dec 24, 2007

Hi Guys,

I have made a database for a mobile phone retail store. The purpose of the database is to sort out network (e.g. Orange, AT&T) payments and compare them to our records. Our manager will enter in details into one table, including the different commisions that should be paid, plus the phone number. The other table is an imported spreadsheet that the commisions from the networks are shown. For each table, I have totalled the commisions.

My next step is to compare the two tables against the phone number, and commision totals, so that deals that have not been paid, or underpaid are highlighted. I know this involves a couple of loops, but my knowledge of Access does not go that far.

I have been thinking that I need to write code that gets one number in the first table and compare it against ALL records in the second table until it gets to the one with the same number, compare the values of commision total, and move on to the next record.

Can anyone help?

Cheers!

View 5 Replies View Related

Comparing Two Tables

Aug 22, 2011

I need to create a query that will compare both tables and just send out the records that dont match to a report.

Table1 asset#,Serial#
Table2 asset#,Serial#

query that checks that in Table1 the asset OR the Serial match the what is in Table2. and if it does not find a match to send it to a report.

View 11 Replies View Related







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