Multiplying Two Fields In A Form From Different Tables

Nov 2, 2011

I have two tables 'LabIssue' and 'Store'.

I created a form for 'LabIssue' in which data will be entered. In the form I want to calculate the 'ChemicalAmount' by multiplying 'Store.Costperunit' with the 'QuantityIssued' which will be entered by the user. ChemicalAmount and QuantityIssued will be stored in 'LabIssue' table. I tried it through the expression builder but im getting #Name? error, did alot of things but couldnt figured out whats the problem.

I am attaching the initial database also for reference.

View Replies


ADVERTISEMENT

Queries :: Multiplying Fields From Different Tables

Jul 5, 2013

I'm trying to create a query that will return a calculated field called "PnL".The formula for "PnL" is as follows: PnL = notional*management_fee*NAV*

The "notional" field is a value derived from a table called "Deal_information" (primary key deal_id) and has an associated "management_fee" and "product" field. So obviously finding the product of the notional field and the management_fee field isn't a problem.

However "NAV" field is from another table (VL_information) that contains the historical Net Asset Value of each product. Fields are (VL_id, vl_date, product, NAV).

Therefore for each "notional" record I would like to return the historical PnL.By way of example. Lets say that the notional valuefor a particular record is $100, with a corresponding management fee of 10% (the managment fee is product dependent). Then I would like to find the evolution of PnL by multiplying this record by the evolution of the NAV. This would do so for each notional value.

View 11 Replies View Related

Multiplying Two Fields

May 16, 2007

hey, i would like to see in the room price column, the total price payed for the room judging by the loyalty(no of nights). So basically i want the loyalty(no of nights X roomprice. At the moment, when i run the query it in the room price it shows just the one night price, but i want to X that by how many nights the person has stayed. I have tryed putting the sum function in the roomprice field and it didnt work.

Thanks.

View 1 Replies View Related

Multiplying Hours Help

Sep 13, 2005

I've searched and searched to no avail to find the answer, hopefully you can help.

The story is:

At work, our holidays are now taken as hours off. For example...if I take a Monday off, its 8hrs and 5 min and a Monday morning would be 4hrs and 5 min...What I want to do is calculate how many hours I have taken off throughout the year.

The way I was going to do it was:

Create Table called Times,

Fields = Week, Day, Morning, Afternoon, Friday and 1hour all Data Type "Date/Time"

Week = 37hrs, Day = 8hrs 5min, Morning = 4hrs 5min, Afternoon = 4hrs, Friday = 4hrs 40min, and 1hour = 1hr.

Then create another table called Hol Booking

Similar field names Wk, Days, Morn etc. They would be Data Type "Number"

Now in my simple head, I thought I could simply record how many weeks or days off i had off. Then create a query (for example) Week*Wk to calculate the amount of hours I had off.
In simple terms if I had 2 weeks and 2 days off, the query would multiply Week (37) by Wk (2) and Day (8:05) by Days (2), giving a total of 90 hrs and 10 min.

I know there is a datatype mismatch, but is there a way round this.

Thanks for listening

View 2 Replies View Related

Multiplying A Value In Textbox To A Value In A Table??

Feb 21, 2006

Hi all,
I have a table shown in a form, beside that table a textbox with a button.
How can I multiply the numer entered in that textbox by the the number displayed in the table, and view the result in the same table??
Please help me as soon as possible?

Thanks in advanced and sorry for bothering you.....

Regards,

View 2 Replies View Related

Multiplying Columns With A WHERE Condition

Nov 2, 2013

I have a table called tbl_IE which has a field named frequency.

I want to multiple all of the values in frequency where the ID is 1. I want to display this on the form as the data is inputted and also on the final report.

View 14 Replies View Related

Queries :: Multiplying Two Values From Same Column

Nov 26, 2013

Names Number1 Number2
Name1 1 2
Name1 2 1
Name1 3 -2
Name1 4 2
Name1 5 5
Name2 1 2
Name2 2 5
Name2 3 2
Name2 4 5
Name2 5 -1
...

For each Name, Number1 will always contain the values from 1 to 5. Number2 can vary, however.

I need constructing a query that, for each name, will look at the values in the Number2 column when Number1 is 1 or 2 and multiply them. So, the result I'm looking for is:

Name1 2
Name2 10

(Since 2 = 2 x 1 and 10 = 2 x 5)

I haven't had much look Googling (most search results involve multiplying two columns together, which isn't exactly what I'm after).

View 1 Replies View Related

Multiplying Currency Times Elapsed Time

Nov 7, 2007

I have a query that calculates elapsed time from TimeIn and TimeOut formatted to hours and minutes. I need be able to mulitply the elapsed time by the hourly wage in order to find the hourly pay.

How do you format the time so that it is compatible to multiply with the wage?

My SQL statement is below. Thanks for your help.

SELECT tTimeCards.ValetFirstName, tTimeCards.ValetLastName, Format([TimeOut]-[TimeIn],"hh:mm") AS HoursWorked, [HoursWorked]*[tValets]![HourlyWage] AS HourlyPay
FROM tValets INNER JOIN tTimeCards ON tValets.ValetID = tTimeCards.ValetID;

View 8 Replies View Related

Fields From Diffrent Tables In One Form

Mar 10, 2005

Hello all,

If i have a query as a Record Source of a form then i can't write to the fields i want, only if i have a table as a Record Source i can.

Any suggestions why might this is happening?

How can i add fields from diffrent tables in one form?

Thank you in advance!

View 3 Replies View Related

Forms :: Two Tables One Form For Different Fields

Oct 24, 2014

Can have one form calling two tables for the different fields?

View 2 Replies View Related

1 Form, 2 Tables, 1 Field To Multiple Fields

Jul 1, 2005

Please be kind, i have little VB Knowledge, and wish to expand my learning on this topic.

I have a form that updates information on one table, and has a subform displaying info from another table.

the subform is filtered, and only shows data from what is specified from the filter of the main form.

If I update information on the main form for instance,
field 1, (the data on the subform has the same data so there is the relation), how do i update the subform by only updating the mainform? can this be done through some VB or something?

if you folks out there can give a Smidget of info on which VB codes i can use i can pretty much figure it out.

like Docmd.write something?

View 2 Replies View Related

Combining Fields Form Different Tables Into The Same Column On A Listbox

Mar 15, 2007

Hi Everyone,

I hope I'm posting in the right place, I've been trying to solve my problem using queries so I thought it might be appropriate here.
I have a database for a health care service which contains among others the following four tables...

Table 1 contains client details, primary key [ClientID] plus other client details.
Table 2 contains Episode of care details, primary key [EpisodeofcareID], [episodeofcareDate] etc...
Table 3 contains all test results for assessment 1, primary key [CoreID], [CoreDate] plus numerous scores for individual tests.
Table 4 contains all test results for assessment 2, primary key [HonosID], [HonosDate] plus numerous scores for individual tests.

Table 1 is linked to Table 2, and Table 2 is linked to both Table 3 & 4.

I have set up a search procedure whereby the user enters a clients name which then opens a list box of all clients with that name. When the client selects from the listbox I want a second listbox to open which has three visible columns. One giving the date of each episode of care for the client, the second giving the date of each assessment completed and the third giving the name of the assessment carried out.

I'm managing to get the date of the Episode of Care to display on the first visible column but I'm getting stuck on the next two. This would seem to involve somehow combining data from different tables into individual columns on the listbox. For example I need the second visible column on this listbox to list all the dates of assessments for the chosen client from tables 3 & 4. (e.g. [CoreDate] and [HonosDate]). Column three would then give the title of the assessment next to the date in column two. None of the tables have a field listing titles as this is determined by which table the data is entered into. I've been trying to solve this by queries without much success.

Could anyone give some ideas as to how I could solve these problems?

Many Thanks

John

View 9 Replies View Related

Forms :: Can Make Form Based On Fields From 2 Tables?

Feb 15, 2014

I have created simple data base containing 2 tables connected each other and I wanted to make a form with fields taken from those tables and unfortunately it did not work and I got errors message.

Before I start to build the form do I need to create the query based on those tables and having the fields I need for the form? If yes, what sort of query, simplest one?

View 6 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

Tables :: Extra Record Added From Form With Unbound Fields

Jul 3, 2013

Using DAO recordset, table enters unbound fields data properly for desired records, but adds an extra record which is a duplicate of the first record entered....any known access quirks for adding unwanted records?

View 3 Replies View Related

General :: Auto Fill Multiple Fields In A Form From 2 Tables

Apr 3, 2015

I have two tables, "Summary" and 'POC Information". In the "POC Information Table I have all my Contacts Information (Name, Title, Phone, Email, etc...) and I am trying to assign 2 POCs to each of my multiple projects located in the "Summary" Table. I am using a Form called "JCIDS Tracker Input Form" as the link. So far I am able to assign one POC by a combo box that lists "Full Name", then it autofills the other information...Phone Number, Email, etc... The problem come into being when I want to assign a second POC to the same Project...I can assign a name, but it won't correctly autofill the rest of the information...it just autofills in the information from the first POC that was selected.

View 8 Replies View Related

Access Form Auto Populated Fields With Linked Tables

Nov 29, 2013

I am really new to Access 2010 as I normally use SQL so im sure this is a very basic question. I have a form where I have linked some sql tables to a table in access so the data gets stored in SQL. The form consists of many fields the basic fields are Policy ID, Name, Office, Month, Dept etc. At the moment users have to fill this in using comboboxes and text boxes but I want to change this so when the user puts in the Policy ID all the other fields are populated ie in the office field it would have a sql query of or something that looksup the office from the policy id that is entered:

SELECT [Office] FROM DBO.DQ
WHERE [Policy_ID]='what is entered into the Policy ID field' and so on.

Also not sure if this works but as I have now linked the tables to SQL does this mean that when a user fills in the information into the form it will then update the SQL table or is this another issue?

View 1 Replies View Related

Forms :: Unable To Enter New Data In Form With Fields From Multiple Tables

Jan 6, 2014

I had an existing database with 2329 records entered into it. All of the fields (220ish) were all in one table. Myself and my co-workers wanted to rebuild the database without losing the data. We wrote queries to transfer the data from the original database to the new database and split the data from the original 1 giant table to 9 smaller tables.

The transfer of data worked so I went to start making forms. When I went to add fields from different tables I had to built a relationship, which I did. All of the data that transferred over from the new database is in the form (now multiple forms linked by button) but I can't add new information. I get an error stating, "You cannot add or change a record because a related record is required in table ..." and the table referenced keeps changing.

View 2 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 :: Set Up Validation Of Fields Unit And Size Based On Another Fields Data?

Nov 18, 2013

Basically in my order details table i have the following fields

Product
Unit
Size

At the moment i have the Product field with a dropdown that gives me all the products from my ProductT. But once i choose the correct product in the unit field it gives me all the possibilities of every product not just the units associated with that product. ie

ProductT
Grasshopper Box1000 Adult
Grasshopper Box1000 Subadult
Worm 10pz Big

When I select the grasshopper product and move on to the unit field i also get "10pz" option but this is not a product available.

How do i set up validation of the fields Unit and size based on another fields data?

View 4 Replies View Related

Tables :: Deleted Fields Not Free Up For Adding New Fields

Aug 15, 2013

I reached the limit of 255 fields in a table. I just need to add one more field so I deleted several fields I no longer needed thinking I would then be able to add one more new field. However, I am still unable to add one more field. How to free up fields that are no longer needed?

View 8 Replies View Related

Tables :: Calculated Fields As Data Type In Tables - Calculating Total?

Apr 23, 2013

I am using calculated field as a data type in access 2010.

They are working fine.

However, I added a new field and now the final calc won't work.

I have Subtotal adding loads of fields together. Works fine.

Then I have a VATunit field which is a double integer, so enter 20 and my next field is VATTotal calculates the SubTotal + the VATunit by doing (Subtotal/100)*VATunit. This calculation is fine and gives me the correct amount.

The next field is a Total field. Which adds Subtotal and the VATTotal together. Howver, the Total is the same as Subtotal. It is not adding the VATTotal to it?

View 2 Replies View Related

Tables :: Calculated Fields From Two Tables / Based On Relationship In Third Table

May 29, 2014

I have two tables of data, each relating to three business branches (branches A, B and C).

Table 1 shows the expenditure of each branch (by fuel, premises and wages).

Table 2 shows a number of units for each branch (mileage, floorspace and sales).

What I would like to do is calculate unit costs, based on the expenditure in Table 1, divided by a relevant unit in Table 2. The catch is that I want to have a third table which allows the user to specify which expenditure (from Table 1) is combined with which unit (from Table 2) to generate the calculated unit costs. I've been able to do this in Excel, and have attached an example. I've also attached an incomplete Access version with the first two tables. Given the complexity of my actual data, I feel this could be better handled in Access than Excel.

View 6 Replies View Related

Tables :: Updating Fields In Multiple Tables Without Onclick Event

Oct 23, 2013

I am working on a database which has two tables used as part of a registration and login process.

I would like a couple of fields from table one to automatically update in table two, once the fields in table one are populated without using an 'on click' event.

The reason I would prefer not to use an onclick is because the completion of the form used to generate the users table does not require any buttons for the data to save.

View 1 Replies View Related

Tables :: Sum All Fields In Tables Column And Put Sum Result Into Variable?

May 29, 2015

i would like to sum all the column fields in a tables column where an id is the same as the id in that table.
I know you can use the SUM function in the select statement of your query.

But how can i set this sum result into a variable, so i can use it for calculation further on in the program?

I work with Access 2010

View 4 Replies View Related

Tables :: Auto Populating Fields Within Tables

Nov 23, 2012

I have 2 tables tblworkdone and tbltests, both have a date field and are both subforms in a tabbed form on the main form. When I enter a date into the tbltests subform I would like the date to automatically be entered into the tblworkdone date field and create a new record so that when I move to the tblworkdone subform with the date already there.

View 5 Replies View Related







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