Queries :: Create A Query That Can Sum Values Of Different Fields In Different Tables

Apr 11, 2013

I'm trying to create a query that can sum values of different fields in different tables...Can I sum values of a field and put the result into another field in different table?

View Replies


ADVERTISEMENT

Queries :: Loop To Create New Tables With Unique Field Values

Sep 20, 2013

I have a table - (Table A) that has 2 fields X and Y. I would like to write a query or script to make two new tables based on the unique values found in field X. In other words, all data where field X = 1 would be written to a new table called "1" and all data wehre field X =2 would be written to a new table called "2".I would like this done automatically.

Table A
Field X Field Y
1 a
1 b
1 c
1 d
2 a
2 b
2 c

View 5 Replies View Related

Queries :: How To Create A Query To Append Values

Nov 6, 2014

I am trying to create a query to append new records from my NEW database into my old excel database.....

The old DB has 4-5 extra tabs that the NEW database does not have so when I append, in those extra columns the new database will just have blank records since the column doesn't exist.

Usually I do a append query in design view. but sometimes it gets funny because it creates duplicates...

How would I go about it, so its quicker and persistent like creating a macro excel.

View 1 Replies View Related

Queries :: Create Query That Takes Values From Search Form And Provides Records

May 5, 2015

I am trying to create a query that takes values from a search form and provides records. I was having issues with getting results when some boxes on the form were left blank. I found a solution to that and it worked with a small number of fields. However when I make the full form query (about 8-10 fields) and run it says the query is too complex. I wrote the sql as I could not get designer to do what I wanted. Attached is the sql that works and that which is "too complex".

View 9 Replies View Related

Possible To Create An Updatable Query Listing Description Of Tables And Fields?

Aug 16, 2007

As I usually concentrate on building the tables and fields in my initial stage, and do some experimenting to analyze the relationship.

However, when I'm done, I find it quite a hassle to go manually through the tables to add description to each field for documenting.

What I would like to do is create a query that will list all fields and its description. Now, I have found codes to retrieve either table or fields properties, including the description property, but am kind of stumped on how I can make it a SQL statement so I can create a temporary query, which will be pretty be one time thing, that can read all fields' description and allow me to type in it, save it.

If that's not possible, I suppose I could write code, using Allen Browne's example, that would loop through the fields' description, debugging to the immediate window and prompting me if I would like to add something to the blank description. However, this isn't exactly greatest as I need to see all fields so I can be sure I'm giving good descriptions.

I figured someone may have had this same problem and maybe came up with a solution?

View 4 Replies View Related

Queries :: Create Table Query From Multiple Fields?

Aug 14, 2013

i essentially have 2 table:

1. Table BIC

A list of codes that will be updated monthly, which will be the basis for querying the second table. Approx 100 rows of data.

2. Table Original

A data file obtained from IT where i'll need to sort it to find any codes that are including in Table1. This includes approx ~ 10,000 row of data.

** note, the "BIC" from "Table BIC" can appear in any of the 5 BIC columns in Table Original.

What i need to do is create a query that will:

1. Search the "BIC" from "Table BIC" in all 5 columns of "Table Original".

2. Where it has a hit, it will create new table - for example, the first row of table Original includes the BIC "ABC" in the "BIC 1" column. A query would create table "ABC" and place this whole record (all 8 fields) in new table "ABC". No modification needed.

3. Where two (or more) BIC's from "Table BIC" appear in one record in "Table Original" - the result will only need to be placed in one of the new tables (really doesn't matter which one). For example, Record #4 includes the BIC "ABC" in field "BIC1" and the BIC "DEF" in the field "BIC4". Therefore, a new table would be created (either ABC or DEF) to capture this information.

View 4 Replies View Related

Queries :: Max ID - Create Query From 2 Tables

Jan 23, 2014

I need to get the MAX id from two tables for use in vb.net. For example:

Code:
Table1 Table2
id, customer id, customer

How do I write a query that will return the last or MAX id from both tables based on a customer criteria.

View 5 Replies View Related

Queries :: Create Numeric Query Fields In MAKE Table

May 25, 2014

Have a Make table query that needs to create (add) several new fields where each field must be numeric design.

Have tried:

Score1: Not Null - does not seem to work (results in a Binary field)
Score1: 0 - which does give me the numeric field designation but every field in table contains a 0.

Would like to show Blank field (makes data input easier at a later time) but still have the Numeric designation.

View 6 Replies View Related

Queries :: Calculation Query To Add Values Of Three Fields

May 8, 2013

I created a simple calculation query to add the values of three fields:

Program_Cost, Auditorium_Cost and Millage_Fee.

I followed the steps found here: [URL] ....

But it doesn't work. The query pulls the values for the relevant fields but doesn't actually calculate the total. What am I doing wrong? Here's the query's SQL:

SELECT [Event Information].Event_ID, Sum([Program_Cost]+[Millage_Fee]+[Auditorium_Cost]) AS Total_Cost, [Event Information].Program_Cost, [Event Information].Auditorium_Cost, [Event Information].Millage_Fee
FROM [Event Information]
GROUP BY [Event Information].Event_ID, [Event Information].Program_Cost, [Event Information].Auditorium_Cost, [Event Information].Millage_Fee;

View 2 Replies View Related

Queries :: Sum Fields From Two Tables In One Query

Jan 29, 2014

I have two tables:

Budget
Actuals

I have these fields in both tables:

MONTH, Organization Code, Account, SubAccount, AMOUNT

I want to Compare the results in a single query. However the amounts aren't correct and after a full day I cannot find the answer.

Code:
SELECT [Budget].Month AS [MONTH], [Budget].[Organization Code], [Budget].Account, Sum([Budget].AMOUNT) AS [Budget Amount], Sum([Actuals].AMOUNT) AS [Actuals Amount]
FROM [Budget], [Actuals]
GROUP BY [Budget].Month, [Budget].[Organization Code], [Budget].Account, [Budget].SubAccount
HAVING ((([Budget].SubAccount)="K08"));

View 10 Replies View Related

Queries :: Two Tables Fields Into One Query Field?

Feb 24, 2015

I have two tables: tbltasks & tblsafety

Both tables have a date field in, one table keeps tracks of my tasks the other the expiry date of some safety checks.

I currently have a timed pop up that looks at dates within a table that are within 30 days from now, if there are any dates the reminder pops up.

The problem is I want the pop up to look at two sepearte columns in two different tables, so I figured it would be easier to create a query combining these dates and just ask the pop up to look at that query date column.

I want to create a query that very simply lists all the dates in one column combined from both tables.

View 3 Replies View Related

Queries :: Calculation Based On Values Selected In Table By Looking Up Corresponding Values In Other Tables

Aug 29, 2014

I'm using Access 2010. I need to calculate a score based on values selected in a table by looking up corresponding values in other tables. I have a "Project" form to create new entries into the Project table (see Table 1). When I create a new project record, I will select values for the Payback and Need fields by selecting options from a list. The Payback list is pointed at Table 2 and the Need list is pointed at Table 3. In the below example, I created the "ABC" project and selected "1 year" for the Payback field and "Repair" for the Need field. Pretty simple.

Now that I have the "ABC" project loaded to my Project table, I'd like to create a report that will show a "score" for this project. The score should be calculated as follows: Payback Impact + Need Impact. In this example, the score should be 30 (Payback Impact of 20 + Need Impact of 10).

View 5 Replies View Related

Queries :: Query To Combine Different Fields From Multiple Tables?

May 13, 2014

I get tasked to use access very infrequently but now I have been asked to create a database. I am struggling with combining 2 tables. I have different data on each table however I do have a unique Identifier. So on table 1 I have Bud, his height, weight, etc. On table 2 I have Bud his home address, phone #, etc. I am using name "Bud" in this case as my unique identifier. I want to create a query that gives me Bud, his height, phone # etc. I want my query to pull in all records. Bud may only have info on table 1 and Budette could be on table 2 but not on table 1. I would like my query to include all the unique identifiers and as much info as I have in the tables.

View 7 Replies View Related

Create A Table Based On 2 Tables With Different Fields

Apr 17, 2007

Hello,

I have attached a zipped excel workbook to best describe what I'm trying to do. I have table1 and table2 and I'm trying to write a query in access to get the output as shown in the workbook. I'm having hard time getting this right. I would appreciate your help if possible. Tks

Richard

View 4 Replies View Related

Tables :: Combining Fields To Create Unique ID

Nov 14, 2013

How i would best combine values in a table to produce a 'primary key id number.'

For example: the first letter of a city in the ID and the next number available/auto number - Portsmouth -> P233

I know i can create this in a query however i want it as the unique ID for that record entry in a table. If that doesn't make sense i can try to elaborate some more.

View 14 Replies View Related

Create Access Form With Having Joined Tables Fields

May 14, 2013

I have at least 3 relates tables in my access database.the first(sessions) table stores session detailes like id,date,time

The second one (tblemployees) contains our employees details like name, idp ,the third (attreq) relates the first table to second it stores ids of sessions and ids of personals that which determine which personals have attended in special sessions.

Now,my problem is that I want when a personnel log in and opens "confirmed session"form ,the access check and open records that this person have attended. How can I do it?

View 3 Replies View Related

General :: Macro To Create Table Fields From Another Tables Records

Jul 10, 2012

I think what I want is:

1 table(1): record of people & contact details
1 table(2): list of events with check box's with the names of people from the other table
1 report: listing how many events people have attended.

When I add a new person to table 1 I want a field to be added to table 2 in the form of a checkbox, also when I delete this person I want this field to be deleted in table 2.how to make this an automated process.

View 1 Replies View Related

General :: 2 Fields From Separate Tables Needed To Create Calculated Field?

Aug 19, 2013

The interface being used is a main form with various tabs and a subform on each of these tabs.

There is one field ('max power density') in my database that is calculated using 'Max Rated Power' and 'Cylinder Capacity' however these are in different tables and subforms. The 'max power density' and 'max rated power' are in table and subform 1 but 'cylinder capacity' is in table and subform 2. Is it possible to keep them in separate tables/subforms and still calculate the field?

View 7 Replies View Related

Tables :: Merging 2 Fields Together To Create Additional Field - Unique References

Jul 23, 2015

Is there a way of merging 2 fields together to create an additional field

my database consists of 4 main tables (in order of relationships)

*HeadOfficeDetails
*SiteDetails
*ContainersOnSite *Contracts2015-2016

For example;

Account Reference: TEST
Site Number: 001

and the field i would like to have;

Site Reference: TEST/001

I would also like that when i add a new site to that account i will have TEST/002....

View 4 Replies View Related

Forms :: Create A Form Using Combo Box To Populate Multiple Fields And Tables?

May 26, 2013

I'm trying to create a form using a combo box to populate multiple fields and tables.

I've created a text field to display the added information using this format:

=Comboboxname.Column(x)

in the text box control source field, and this works for display purposes.However, I need it to populate this data into a field on a table.

For example:

My combo box looks up data that has 2 columns, Part Number and Description.

The control source for the combo box is "Part Number". And that populates the part number in the "Main" table no problem.

The text box I created using the above format in the control source populates the field in the form, but not the "Main" table.

Is there a way for the other (description) field to also populate the "Main" table as well?

View 5 Replies View Related

Tables :: Preventing Duplicates Values In Fields

Oct 12, 2012

I am trying to modify an inventory management database. I want to prevent duplicate entries to specific fields in centralized table. The table is called Work Stations. Its function will be to track various computer equipment by a specific work station name. Each of the items will have a unique asset tag.

The primary Key for Work Stations is WS-ID. The fields I am trying to prevent duplicate entries in are WS-Computer, WS-Docking Station, WS-Monitor_1, WS-Monitor_2, and WS-Switch. Each of those fields are primary keys in 4 different tables that conation more detailed information about item. The exception is WS-monitor_1 and WS-Monitor_2 have a one-to-many relationship with Mon-Asset Tag in the monitors table.

The goal I am trying to accomplish is when a work station ID is created or modified duplicate entries are prevented to those fields listed above. The computer, monitors, docking station, and switch fields in the work station table may contain data or may be null.

I have tried to set the Indexed Option to Indexed (No duplicates) for each of the fields and I have also tried setting Yes to Ignore Nulls in the index option on the table design tab for the individual fields. Both options have returned the same error stating the changes would create duplicate values, in the index, primary key, or relationship.I have not created form for this table yet as I was trying to get no duplicates option to work first. I have verified the data and the only duplicating fields are the Null fields

View 6 Replies View Related

Create & Populate Through Access Query And Their Values

Apr 14, 2008

Hallo,

I need your guidance to do the following;

On a click of a button from the Form the following should execute.
I have created 50 queries. Each query has more than 1000 recordsets.

1. I want to count the number of rows for each query (50 queries = 50 different values)
2. create one table and populate those 50 different values into the table
3. Using those values in the table; a Stack column chart has to be created.

In simple explanation; on a click of a button the data should be processed and chart has to be created.

Just a tip will also do to try on my side.

Thank you in advance

View 1 Replies View Related

Forms :: How To Create A Query On Lookup Of Multiple Values

Oct 19, 2013

I wanted to create a form where you can select multiple values from the table "years" and on a button it would open a query displaying all the records in "students" in those years selected.

View 3 Replies View Related

Queries :: Finding Top Three Values In Six Fields?

Oct 3, 2013

I'm doing a medical db, where I'm trying to calculate ISS

Code:
en.wikipedia.org/wiki/Injury_Severity_Score

There are 6 values, and i have to sum the largest three (squares to be precise). How can I get three highest values from 6 fields in the same record?

View 1 Replies View Related

Queries :: Combining Fields - Spacing Between Values

Mar 6, 2014

I'm creating a query which pulls together the numerical values of 32 separate fields. Each field has the potential to have a value in it ranging between 1 and 9, but most fields will be blank.

I want to prefix the value (if the value is not null) with a 2 or 3 character-long code relating to the field name.I then want to combine them all together in a query so I can easily copy and paste the output to a spreadsheet.Here is what I have so far, with just 9 of the field names, and it's already looking a bit clunky.

Code:

IIf(IsNull([zam_adm]),"","ADM") & [zam_adm] & " " &
IIf(IsNull([zam_cts]),"","CTS") & [zam_cts] & " " &
IIf(IsNull([zam_crs]),"","CRS") & [zam_crs]& " " &
IIf(IsNull([zam_IPB]),"","IPB") & [zam_IPB]& " " &
IIf(IsNull([zam_opr]),"","OPR") & [zam_opr]& " " &
IIf(IsNull([zam_owl]),"","OWL") & [zam_owl]& " " &
IIf(IsNull([zam_pmi]),"","PMI") & [zam_pmi]& " " &
IIf(IsNull([zam_wl]),"","WL") & [zam_wl]& " " &
IIf(IsNull([zam_sgt]),"","SGT") & [zam_sgt]

The output, unfortunately, is putting spaces between empty fields and I'm not sure how to prevent this in the syntax?

View 3 Replies View Related

Queries :: Adding Totals For Fields With Same Values

Aug 13, 2015

I've got a table with data that's been imported from Excel. I need to run a query that pulls the same values of field one and adds the values of field 2. For instance:

Field 1; Field 2
Jones; 200
Smith;150
Jones; 300
Smith;100

In this example, I need the sum of field 2 for the records where Jones is the value in field 1.

So the result in this case is that records where Field 1 = Jones, Field 2 = 500.

View 2 Replies View Related







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