How To Calculate Results From Two Tables

Feb 1, 2013

i have a small school with number of teachers, every teacher has a specific number of observations in the semester, i need a small project that when i query a bout a teacher, a form appearing with his name and the remaining hours of observation

what i did is i made two tables teacher (id, name, total number of observations in semester) observation( Oid, name of teacher, date and time of observation, remaining observations) -- i dont know if i have to make a counter or what !!--

Now what i need to do is a form when i enter the id of the teacher, it shows automatically the name of the teacher, and the number of remaining observations

How can i join the two tables and show the results ?

a sample Db TEACHER.zip

View Replies


ADVERTISEMENT

Tables :: DLookup Between Two Tables - Calculate Product Price?

Jul 30, 2014

I'm trying to do a lookup between two tables, whereas table A includes the product ID and table B includes the price. Is it possible to create a field in table A with a DLookup function on the product ID to get the product price from table B?

Whenever I try to type in the DLookup function, it does not calculate.

View 2 Replies View Related

How To Calculate Fields In 2 Tables In VBA

Apr 23, 2013

I have 2 tables - Customer and Carrier.

Each table has 3 headers (fields). Address, Latitude and Longitude.

I would like to know, how I take the value of the field (i.e Latitude) in each table for my calculation?

In Excel, I can specify the column (i.e Range("B" & x) - where 'x' is the row number)...but how do I do it in Access.

Code:
Dim db As DAO.Database
Dim rsCustomer As DAO.Recordset
Dim rsCarrier As DAO.Recordset

Set db = CurrentDb
Set rsCustomer = db.OpenRecordset("Customer")
Set rsCarrier = db.OpenRecordset("Carrier")

[Code] .....

View 2 Replies View Related

Tables :: Calculate Remaining Days In A Table

Feb 11, 2013

I'm trying to step from Excel to Access and I have some issues to translate functions that I used in Excel to Access.This is how it looks in Excel.And I have issues to translate the following function in Excel to Access.

=IF(AND(I6=0),"Done",K6-A$4)

A$4 is related to cell where it states the function =now() Basically what I want is to calculate in the tablecolumn is the following.In the column "Days remaining" I want the remaining days from "date to pay" and today. If the amount states "0" then the outcome must be "done".

View 3 Replies View Related

Tables :: Calculate And Store Time From Dates?

Nov 11, 2012

We are collecting data from client files that have multiple dates (start_date, event1_date, event2_date, end_date.) For client protection purposes, we are absolutely not allowed to leave the facility with the actual dates. However, we want to know how many days have passed between each event. I thought about having the data collectors enter each date, have a calculated field store the time between dates, and then have the actual dates cleared when the record is saved or when the person moves to the next record.

View 14 Replies View Related

Tables :: Calculate Number Of Days From Two Dates In Table?

Apr 20, 2015

I am making a basic hospital management system in Access 2013.I have two tables named "Bed" and "Receipt". Bed(BedID,AssignedDate,PatientID,DischargeDate,Bed Charges) Reciept(ReceiptID,PatientID,BedCharges) I want to calculate "BedCharges" by calculating the number of days using "AssignedDate" and "DischargeDate" and then multiplying with a constant amount of charges per day. Also the BedCharges calculated in "Bed" Table also needs to be in the "Receipt" table. How can I count the number of days and then calculate the "BedCharges" in both the tables?

View 8 Replies View Related

Tables :: DCount - Calculate ID For Month And Year From Another Table

Sep 25, 2014

I have a table that displays the year and month and another field that I want to calculate how many id have that month and year from another table.

View 3 Replies View Related

Tables :: Auto-Calculate Field From Other Table Values

Aug 10, 2015

How to set up my tables as I'm just starting off with setting my database up.

I'm doing a simple database to track the purchase orders (PO) I am managing. Each PO has a PO Number and an Original Value. POs may have multiple amendments which would change the PO value. I would however like to keep the history of the PO original value and all different amendments.

So I created two tables:

tblPO:
ID
PO Number (Number)
PO Original Value (Currency)
PO Sum of Amendments (???????????)
PO Current Value (Calculated = PO Original - PO Sum of Amendments)

tblPOAmendments:
ID
PO (Lookup from tblPO)
PO Amended Value (Currency)
Amendment Date (Date/Time)
Amendment Desc (Text)

Now the two, million dollar questions are:
1.) Is this the right table structure to use.
2.) How do I go about calculating the Sum of Amendments field?

View 4 Replies View Related

Tables :: Calculate Some Additional Data And Generate Quotations - Too Many Fields

Jun 2, 2015

I have a database that will take lots of data entered by an employee and calculate some additional data and generate quotations. Within each quote there is a possibility for 15 different metals (5 Precious Metals, and 10 Base Metals). There is also 5 fields that need to be filled out about each Metal (What the metal is, the market being used, weight, whether it is included in a different price, and the price). I currently have 75 fields to address each Metal and their 5 fields respectively. Is there a better way to Normalize this data, and accomplish what I need accomplished? I want at the form level the employee to tell the database whether they want to add a Precious Metal, or Base Metal, or Move on to other data entry.

Here is a Screenshot of the design view of one of my tables with too many fields : table screenshot1.PNG

View 14 Replies View Related

2 Tables That Don't Product All Results

Dec 1, 2006

I have 2 tables a project table and a project additions table, they have a relationship of 1 to many. When I run the query using both tables it only gives me the results of the project numbers that match in both fields. I need to have all information from both fields.

View 1 Replies View Related

Two Tables, One Query, No Results

Jan 14, 2007

I am trying to build a query that allows me to enter data over two tables that are related. I'm using MS Access 97 if that makes a difference. For example

I have two tables like the following

Class
Class Id (auto number, primary key)
Class Name (text)
Class Teacher (text)
Class Room (text)

Student
Student ID (auto number. primary key)
Student Name (text)
Student Course (text)
Class Id (number, secondary key)

I tried creating a query that allowed data entry for the following fields

Student Name
Class Name

It first has the following error when trying to enter data in both the feilds;
The Microsoft Jet database engine can't find a record in the table 'Class' with key matching field(s)".

So i tried adding the record in the table class, but now i cant even see it in the query.

Any ideas?

View 2 Replies View Related

Getting/merging Results From 2 Tables

Jan 25, 2008

I've got some tables I pulled off GeoNames.org that I need to extract data from. One table has everything I need except the counties listed in it. Instead of that, it gives a county code. The other table has the actual county names associated with those codes.In the main table, country and state are listed similar to "US" and "WA", representing U.S.A. and Washington state, with the city name ("Seattle") also displayed in a separate field. A county may be displayed as a county code of 003 or 101, or any such 3-digit number. The thing is, multiple counties can have the same county code, since each state's counties start their numbering over at 001, 003, 005, etc.In the county table, one column has the country, state, and county code in one field similar to US.WA.003, and the county name ("King County") in another field.What I need to do with this info is create a new table that will have only the country, state, county, and city names (omitting the text "County", if possible). So, my final result would be: US, WA, King, SeattleI just don't know how to pull the data from each table while merging the county information.The reason I haven't included the examples of the tables I'm using is because I'm hoping to be able to put together the query myself, with the help you all can provide me with. Alot of times, there are well-intentioned people who are kind enough to layout everything exactly as you need it to come up with finished results, and I'd just like to get the opportunity to take a shot at it myself first. If I can't get it from there, believe me, I'll be back for more help.Thanks in advance.

View 10 Replies View Related

Clearing Tables Results In Nonworking Db

Oct 5, 2004

I finally finished the database.

So I decided to remove all the test data.

Now I get errors like

the linkmasterfields property has produced this error "the object doesnt contain the automation object

when I try to enter new, live data.

Also, I get

The microsoft jet database engine cannot find a record in the table ... with key matching fields ...

I know the fields are there. I know it works. What in heavens name is going on????

View 6 Replies View Related

Lookup Tables And Filter Results

Jan 12, 2012

I've created a table (Films). One of the fields is linked to another table (People). The table 'People' is a list of people with a categorization next to them (e.g. actor, director etc)

Is there a way that I can create a field called 'Actors' in the table 'Films' and for the drop down only to display those people who have been categorized as an actor?

View 1 Replies View Related

General :: Calculations From Two Tables And Show Results

Jan 31, 2013

I have a small school with number of teachers, every teacher has a specific number of observations in the semester, i need a small project that when i query a bout a teacher, a form appearing with his name and the remaining hours of observation

what i did is i made two tables

teacher (id, name, total number of observations in semester)
observation( Oid, name of teacher, date and time of observation, remaining observations)

I dont know if i have to make a counter or what !!-- Now what i need to do is a form when i enter the id of the teacher, it shows automatically the name of the teacher, and the number of remaining observations

How can i join the two tables and show the results ?

View 2 Replies View Related

Tables :: Duplicate Results In Count Queries?

Feb 18, 2013

I have a table with a field 'FName'. I have run a query to count the number of each Name in this field. However, as well as having a blank field with 9129 results (which was expected) but another with 24 results that appears to be completely blank as well. There are another couple of incidences were results in 'FName' are appearing twice.

how to identify what is causing this duplication?

View 5 Replies View Related

Queries :: How To Query Two Tables And Compare Results

Apr 18, 2013

I am putting together a database for work, I have a table that is used to refer to (this table is part of our production system) in this table it lists products run, dates run and who has run.

I have the training records data table, this lists; who, machine and status: "trained" "refresh required" " not trained"

I want to build a query so that it searches the production table for the last 6 months worth of records & if an operator that is in the training table (WHO) as status (trained) is not in the production table it outputs a "to be refreshed" report or amends the records from trained to "refresh required" ...

View 1 Replies View Related

Tables :: Adding Records - Unpredictable Results

Jun 27, 2015

I have three tables

MyForms
MyControls
MyLanguage

There is a 1 to many relationship between MyForms and MyControls
There is a one to many relationship between MyControls and MyLanguage

I have a function that populates these tables.
For each form in the system I store 1 record on the MyForms table.
I then store 1 record for each control in the form on MyControls.
For each control I store N (currently 2) records on MyLanguage.

This all works fine up to a point. I noticed that after a time records were no longer getting stored on MyControls and MyLanguage.

The only way around this was to delete all records on all files (I have cascade delete so only need to delete MyForms) and the Compat and Repair the database. The compact and repair doesn't work unless I delete the records first.
It seems to go astray when the MyControls table hits 14-1500 records (MyLanguage 28-3000).

I've stepped through the code line by line and the store of the records appears to go through fine.

View 12 Replies View Related

Tables :: Creating A Table With Yes / No Data Type Results

Jun 18, 2014

I am creating a table that is a master list of all of my company's product. Each "customer" that we have will always be ordering the same items, but not all of the items that we have available. I need a way to go through the master list and click a yes or no and have that item added to the "customer's list of items on a new table.

I need to create a sublist for each "customer" like individual shopping cats for each customer. These individual lists need to link back to the master list in case of product changes, description changes, and cost changes.

I would like to create a form where the end user can type in a product number, description, or manufacturer number and have that item added to the "customer's" list.

View 3 Replies View Related

Modules & VBA :: Show Results From Multiple Tables In One Listbox

Aug 4, 2013

I have multiple tables (Desktops and Telephones)

A search form, to search into those tables (It searches by "User")

The search form contains a listbox that shows results (listPC)

And the following code:

Option Compare Database
Dim strUserPC As String, strUserTel As String
Dim db As DAO.Database, rsUserPC As DAO.Recordset ', rsUserTel As DAO.Recordset
Private Sub txtSearch_LostFocus()
strUserPC = ""
strUserTel = ""

[Code] .....

It works, but I have one problem. It only shows telephones or desktop, not both. It deppends on which line inside UpdateList is first.

That example searches into 2 tables:

-Telephones
-Desktops

And searches by "user".

I want to list all telephones and desktops that a user has assigned.

What should I change to show both results?

View 9 Replies View Related

Tables :: Access External Data Results In TMP Files

Oct 7, 2013

Running Office 365 (Access 2013). Recent problem occurrence. When I do an 'External Data' command, either from another Access database or an Excel file, the import completes, but I don't see the new table immediately in the navigator section. If I import from another Access database, the new imported tables appear as '~TMPCLP....' tables. If it's from an Excel workbook, the new table doesn't appear at all. It's only after I exit the database and reopen it do I see the new tables correctly named.

View 1 Replies View Related

Tables :: Summation Of Fields In A Table Based On Query Results

Nov 5, 2013

I have a form that users can input data into and based on that data it runs a query and generates a report. These reports can be different based on user entered data on the form. My issue is within the report I would like to sum certain fields. The problem with trying to sum theses fields is that they show up on each row so I have hidden duplicates but when trying to sum the field it still trys to count the hidden duplicates thus giving a value that is of no use.

I have tried many methods to sum but one of the problems I continue to run into when I create a text box and build an equation and reference the field I would like to sum is when the report runs it is asking for a value to be entered for the field I am attempting to sum. I shouldn't need to enter a value as I am trying to obtain the value.

View 13 Replies View Related

Tables :: Limit Combo Box Results Based On Secondary Table

Dec 4, 2013

I have a DB with 4 tables:

Property (used for look-up values)
Service Type (used for look-up values)
Rate Table (uses the Property Table and Service Type Table and is used as a rate look-up table for the daily service table noted below)
Daily Service

Using the Daily Service table, I need to choose a property, choose a service type that is limited to the property (100's of service types, but a property may only have a limited number), and enter a quantity, and have the Rate Table return the specific cost of the service. I didn't think this was too hard in Access (2013), but I seem to be hitting a wall and spending too much time figuring it out. Now I am behind in my project.

I have been trying to do this in a table format, but have been unsuccessful in limiting the results of the Service Type combo box based on the property chosen.

View 2 Replies View Related

Queries :: Multiple Tables In Database - Inverting Results Of Select Query

Feb 5, 2015

I have a question where I need to effectively invert the results of a select query.

I have multiple tables in the database, but the 2 I'm looking at are TBL.Trip and TBL.TripDiary

A trip is logged in the trip table, and then an operator logs a diary entry against the trip. One of the options that the operator selects is when they receive an email back from the traveller, this is logged as a diary entry.

I need the query to look at the DIARY_Action field and select all records in the TBL.Trip that DO NOT CONTAIN an entry for Diary Action "4".

I can produce a select query that gives me the results to see all trips that HAVE had a response, with a simple IS LIKE "4" query in the action field.

If I change this to IS NOT LIKE "4", I get the results that I need, but duplication due to the various other "diary" entries in the table".

I simply need the inverse of the IS LIKE query but cannot see how to remove the duplicates?

View 5 Replies View Related

Tables :: Calculate Default Date Value Based On Todays Date

Jul 16, 2014

I have a database which stores information relating to club members, which I'm in the middle of giving a bit of a facelift and one thing I want to automate is the calculation of the expiry date.

My memberships expire annually at the end of December and the expiry date is set as a default value within the table properties. This has to be manually changed every September (every new member from then pays for 15 months) to the following December.

Is there a formula I can insert in the defaul value field that will return December the current year if todays date is between January and August, and December next year if todays date is between September and December?

View 14 Replies View Related

Tables :: Calculate Value For A Field Based On Value Of Another Field - Statement

Dec 30, 2012

I'm trying to calculate a value for a field based on the value of another field, [Field1] has a value list of 28 choices I want [Field3] to take that value and multiply it by the value of [Field2]. I'm using an Iif statement and it sort of works. I looks like this:

IIf([Field1]=1 Or 2 Or 3 Or 4 Or 11 Or 12 Or 13 Or 21 Or 22 Or 28,[Field2]*0.06,IIf([Field1]=5 Or 6 Or 14 Or 15 Or 23 Or 24 Or 29,[Field2]*1.1,[Field2]*2.1))

I receive nor errors but it will only return the value of [Field2]*.06 no matter what is selected in [Field1].

I'm sure I'm missing something and there is probably an easier syntax to use, but I'm at a loss at the moment.

View 4 Replies View Related







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