Formula For Table Fields

Apr 23, 2007

I have two fields on a table that has numeric values.

I'd like to create a third field where i would just like to divide the two numbers, multiply by 100 and display the results on field three.

I can't use forms or reports as i need to be able to export this information to excel.

Can this be done?

View Replies


ADVERTISEMENT

Formula Counting Fields In Either Query Or Report

Dec 15, 2004

Hi

I would like to count number of items witin a text field,
but breaking it down identifying the different items within the
text field.

e.g.

Got a field with fruits listed. Now I am identifying the fruit but want
to know how many rotten fruit there was for each specified fruit.

At the moment my query is by date and the fruit including the column
specifying if the fruit is rotten or not. But there is 3 options in the last
column. How can I count this last column to count how many of these
3 options there are for each fruit in my report?

Please let me know if this makes any sense or not otherwise I will try to explain
it a little bit better.

View 1 Replies View Related

Queries :: Writing Formula In Query On Existing Fields

Apr 14, 2015

I have a table linked to SQL Server 2014. As SQL Server 2014 does not support calculated fields I created a query to use formulas. Now I want to write formulas on the existing fields ( TotalMarks ) of table Not to create new fields.

View 1 Replies View Related

Convert Formula Into Formula Result

Apr 6, 2007

Hi All:running Access 2000.I have a qry with a formula field that performs some calculation (Extension: CCur(([OnHand]*[Price])/[UnitsPer]))and it works fine. How can I update the actual table with the result of the calculation for every record? The problem I have is that there's some null values in the results therefore when I try to get totals on that field, it errors out saying "invalid null use"thanks

View 7 Replies View Related

Transfering A Formula From A Form Into A Table

Nov 21, 2007

I've built a table and used it to build a form. One the form I have three boxes, one to enter the DoB, and two others that record the age and also put the individual into an age bracket.

In the latter two categories I have entered a formula in the Properties Box under Data & Control Source (the formulas are below) to automatically work out what the age and age bracket is when the DoB is entered. This works fine but the information isn't transferred back to the table.

Do I need to do the info in the table first and then update the form? And if so where do I enter the info in the field properties in the table design view?

=Int((Date()-[DOB])/365.25)

=IIf([age]>=50,"50+",IIf([age]>=35,"35-49",IIf([age]>=25,"25-34","16-24")))

Many thanks in advance

View 2 Replies View Related

Trying To Use A Formula In Access To Update A Table

Jan 22, 2005

I have a form that has 3 fields each representing a different table. I want the sum of 2 of the fields to update the third field. The third table has an existing value in it, but I need it to change when the formula is executed. I have a formula embedded in the form and can make the formula work, but it doesn't update my table. How can I make it do this? :confused:

View 1 Replies View Related

Storing Info From A Formula In A Form To A Table

Nov 17, 2006

Hi,

I am an Access newbie and I have a form running about 5 seperate formulas and I would like to store the info in the table that it is associated with so that I can use it later in a query to create another formula. Any help would be greatly appreciated.

View 6 Replies View Related

Newbie- How To Attach Formula To Field In A Table.

Mar 9, 2008

I'm sure this is a simple issue, but so simple I can't find the answer.

I have a recipe DB and have calories and fat and fiber fields, I want to have another field which will display a point count for a formula (calories/50+Fat/2+fiber/5) but the catch is if the fiber number entered is over 4 I only want the calculation to use 4 max.

Not sure how or where to create this formula to populate a field in the DB.

As you can tell I'm new to all this and any help would be appreciated.

Thanks in advance
Mike

View 14 Replies View Related

Number Fields In Text To Number Field, Formula For Fiscal Year

Nov 26, 2004

Date of Birth (DOB) field etc. in one program are text - how do I make another file with the same data into number fields for Date of Birth field etc? When I copy data to file that has number fields the 09252004 is changed to 9252004. Can I get reports with the correct Date of Birth in them by moving data from text file to number file?

There is data entered monthly in file and formula has been set up for January, February etc as ---quarter: Int(([month]-1)/3)+1. I would like formula for the fiscal year for April to be counted as month 1, May - month 2, June as month 3, July as month 4, August as month 5, Sept as month 6, October as month 7, Nov as month 8, Dec as month 9, Jan as month 10, Feb as month 11 and March as month 12.

Thank you

View 6 Replies View Related

Modules & VBA :: Add Formula To Code / Export To Excel Table

Sep 25, 2014

I have a report exporting to excel using late binding techniques. When exported into excel i have numbers for 1,2,3,4 tblPreSiteSurveys. PreSiteSurvey Stop TheClockReason entitie and I am trying to either change the numbers here casting from int to string

1 = a
2 = b

looping through the record set, Or i have a blank field in my SQL for the column "P" and adding the formular to that column, but it only goes into the first row of the record set, which is a expandable table.

On Error GoTo Command29_Click_Err
'Utilergy Master Update report
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Dim UserDate As Date

[code]...

View 12 Replies View Related

Using Query Formula Information To Create Another Formula In A Seperate Query

Nov 20, 2006

I have a query that calculates input information into a value that then needs to be compared to another query values and will be used to output a % change in a third query. Is there any way to make this happen? Thank you in advance!

View 2 Replies View Related

Updating Specific Fields In Table 1 With Fields From Table 2

Jul 6, 2012

I have 2 tables.

Table 1: Master table
Table 2: Temporary table

This is my current process:

Every quarter I run a report that pulls loans that meet specific criteria.I export this report into excel (the loans fall into column A)I add a file number and box number in columns B and C.I import the excel spreadsheet to table 2 (they're linked so I don't need to import, it's automatic)

Now that I have the updated information back into the database (table 2), how can I get this information back into table 1? The excel spreadsheet only contains a few loans that need to be updated in table 1. I have tried creating an update query with both tables linked and use the "update to" field. However, when I tried to run the query, it says I have 0 records updated.

My update query is as follows:

Field: Access Bar Code
Table: Table 1
Update To: [Table 2].[Access Bar Code]

Field: Access Box Number
Table: Table 1
Update To: [Table 2].[Access Box Number]

Basically I'm trying to have the query update specific fields in table 1 based on the information from table 2.

View 1 Replies View Related

Beginners Question - Auto Update Fields Based On Fields In Another Table

Nov 26, 2007

I don't have any database experience whatsoever so please go easy.
I'm guessing this kind of this is extremely simple for all of you.

I'm constructing a database of network resources and devices and I'd like to automatically update the values in one field based on the values of a field in another table.

The first table is called "IP" and the fields are called "Address", "IP Type" and "Device".
The second table is called "Devices" and contains the fields "Name", "Description", "Asset Number" and "IP".

Here's an example of the tables: (ignore the "code" tag. i've only used it to align my columns properly)

DEVICES:
NameDescriptionAssetIP
XserveFile Server107203.30.144.75
ProliantXDHCP119203.30.144.15



IP:
AddressIP TypeDevice
203.30.144.75Static
203.30.144.15Static


What I want is for the Device field in the IP table to automatically update it's values based on the values found in the Devices table. In this case, the values that should appear in the Device field in the IP table are "Xserve" and "ProliantX".

I've searched through but haven't found a complete solution, just little pieces which I'm too inexperienced to put together myself.

thank you
-Tim

View 2 Replies View Related

Creating New Table From Form Data Fields/clreaing Datat Fields.

Apr 13, 2008

I created a form in Access that retrieves data from a table. Inside the form, I am able to access/populate data fields with data from the table. I also have data fields, inside the form, that requires key-in data. I have some how lost the ability send all data field information to a second table and clear existing data fields for new entry.

Questions: What settings, code or buttons can I use to send/store data field information to a new table? What settings, code or buttons can I use to automatically clear all data fields from my form once data has been sent to the new table?

View 7 Replies View Related

Forms :: Adding Fields In A Table And Having Output Fill Fields On A Form

Jan 29, 2014

I have a totalquery that runs fine and give me the sum for both fields I'm looking for but I can't get the outputs to fill the fields on the form. I have tried the Dcount query in the control source but that just returns an error and locks up access.

Code:
SELECT [Tble-wcDelays].Causedby, Sum([Tble-wcDelays].HoursDelay) AS SumOfHoursDelay
FROM [Tble-wcDelays]
GROUP BY [Tble-wcDelays].Causedby, [Tble-wcDelays].LinkingID
HAVING ((([Tble-wcDelays].LinkingID)=[Forms]![Frm-ePlusCent]![cleanID]));

That is the query.

View 14 Replies View Related

Modules & VBA :: Pass Data From Fields Into Table And Reset Fields

Aug 27, 2013

I have a database that will register the emails coming in and what time, also the time, date out and person.

I have a form with the fields to be filled in and a submit button. There are some fields that are automatically filled in and others need manually fill in.

below that part is a sheet (subform in the form of sheet) that should be filled in with the above data. Once it is there, it should empty the fields so they are ready to be filled in again. If I fill new data and press the submit button, it should go to the next available row.

View 2 Replies View Related

Search Key Error 3709 On 2 Fields In The Table - All Other Fields Allow Update

Aug 21, 2013

I have a copy of the back-end that gets a search key error 3709 on two records. In other words, I can duplicate the problem.

The interesting part is that I can update any other field on both these records and save the record, but when I try to change two specific fields, I get a Search Key Error and have to ESC out to continue (basically UNDO the change). Both fields are text fields with lengths of 7 characters and 255 characters, and both are COMBO Boxes on the form.

I tried to focus on the form think there was an issue in the code. I can definitely TRAP the 3709 error on the ON ERROR event on the form using "if dataerr = 3709", but then I tried something even simplier.

I went directly to the table and to each of the records. Again I can update any other field in the record but these two specific fields. When I try to change either of them and move to another record, you get a Search Key Error 3709.

By going to the table record directly I'm as low level as I can get. There are no validation rules on either field at the database level. If it was truly CORRUPT would it let me update any of the other fields on either of these records? One is an empid (not a primary key but is indexed with duplicates okay and not required), and one is status code (not a primary key but is indexed with duplicates okay and not required) so they're no critical fields, but something is keeping them from CHANGING.

Just tried something else; deleted the INDEXES on both the fields. Now it works! I am completely confused now because it really wasn't a corrupt record, but the indexes are causing the problem. Do I need to update the indexes somehow when the users selects a new empid or status code?

View 6 Replies View Related

Combine Like Product Fields In Table And Total Quantity For Those Like Fields?

Apr 22, 2015

I have a product table that includes the name of the product, the quantity ordered, and the unit price. This is a summary table for the whole year showing all of the orders. The Primary Key is [ID] from the [tblOrders] table. I attached a screen shot of my query. I don't know if you can see it. I want to generate a report where each product is listed once, the unit price for that product is listed, the total number of that item that was ordered throughout the year, and finally, the total amount spent for each item during the year.

View 2 Replies View Related

List Box Fields Into 2 Fields In A Table

Oct 12, 2006

I have come up with another one that may be easy for you.

I have a form that has a list box with two fields in the table.
Call the table: STATE TABLE1
Call the first field: STATE NUMBER 1
Call the next field: STATE NAME 1

When I access the list box on the form, I have it so I can see the States Name(STATE NAME1) and I click on it and the (STATE NUMBER 1) is place in another table called: INVENTORY2 in the STATE#2 field. That works all well and good.

I would like to be able to continue this, at the same time I select the (STATE NAME 1) on the list box. I also want to place (STATE NAME 1) into the INVENTORY2 TABLE in another field call (STATE NAME2)

I was going to write an expression to do this but had trouble with finding the STATE NAME 1 field.

I am sure there is an easier way.

PS This table is being used in another application and there is no way to modify any of its field at the time of the transfer. All the fields need to be populated at the time of the transfer.

Thanks for your help.

View 2 Replies View Related

Need 2 Fields From Table 1 / Using Lookup Info From Table 2 And Put Into Table 3

Jun 28, 2013

I need to get x and y coordinates for each device, but the data has to get looked up from 2 other tables.

I have a table (called InstReclosers) that has device names. Each device is on a Section. I can go to another table (called InstSections) and look up what Node that particular section is tied to. Then I need to go to another table (called Nodes) to get the X and Y location for that particular node.

How I can go about getting this X and Y data into the InstReclosers table?

...in summary, InstReclosers has device name and section name. InstSections has section name and node name. Nodes has node name and XY coords. Need XY coords for each device in InstReclosers.

View 3 Replies View Related

Forms :: Display Some Fields From Master Table And Only Last Entry From Child Table

Jul 1, 2013

I have 2 tables, master & child. with a one to many relationship.

On one of my forms I want to display some of the fields from the master table and only the last entry from my child table.

How would i accomplish this?

View 5 Replies View Related

Reports :: Get Data Fields From Another Table Based On 2 Dates In First Table

Oct 29, 2014

Anyway, I would call myself intermediate level at best with Access. I never expected to have to do so much with it, but when my bosses found out I could do Access basics, they began demanding more and more.

I manage an EMR from which a datapull occurs on discharge to various access databases.

They wanted me to add a triage patient data pull to track what procedures are being done to triage patients. So I built a database with the following 2 tables.

tblTriageVisits and tblTriageProcedures
tblTriageVisits has the following fields
-Patient ID
-Export Time

[Code].....

The tblTriageVisits stores all the patients triage visits. The other table stores what was done to each patient on those visits

It should also be noted that this EMR exports times in number of seconds since 12/31/1975, so TimeProcFMS is the number of seconds since that date for example.

The pulls work great and the duplicate record elimination method works great.

I have to design a couple of different reports based on this data and one in particular has pretty much flumoxxed me.

I need to make a report that lists each patient by date they were there and then shows what was done to them. I have tried several different variations of this as both queries and reports. The report breaks down when I try to get it to show just those procedures that would be for that triage visit. I got to the point where it would group by day and then sort the patients alphabetically. Then I added in the visit fields. And it would put all triage procedures for that patient from all their visits in each visit.

So, I was like great, let me filter out those that don't occur between the two dates, admission and discharge

I used the following two formulas (the first one on the procedure name field the second on the procedure date field)

=Switch(DateAdd("s",[TimeProcFMS],#12/31/1975#)>=[Admission DateTime OB DateTime] And DateAdd("s",[TimeProcFMS],#12/31/1975#)<=[LD Discharge Date/Time DateTime],[Procedures FMS])

=Switch(DateAdd("s",[TimeProcFMS],#12/31/1975#)>=[Admission DateTime OB DateTime] And DateAdd("s",[TimeProcFMS],#12/31/1975#)<=[LD Discharge Date/Time DateTime],DateAdd("s",[TimeProcFMS],#12/31/1975#))

And they work, sort of. They do eliminate those procedures that occur outside of the date range I am looking for. However, the access report still leave spaces in the report where the filtered out items would be.

Did I approach this problem correctly? And if so, how do I get rid of those spaces?

Note, I can read and mostly understand SQL, but am not comfortable working in it yet. And the Access SQL box gives me a headache, it is so jumbled up.

View 14 Replies View Related

Queries :: Join Multiple Fields From One Table To Same Table In A Query

Nov 21, 2014

I have a table that is basically a survey form. The same series of options was available for 35 questions, and the table used to have a text string written for each answer. Because of all the repetitive data, I created a second table that assigned a number value to each of the nine possible options in these 35 separate fields. What happened is that, instead of the same text strings repeated over and over (and taking up real estate), now each of the 35 columns had a single number in them.

Now comes the day of reckoning and TPTB want a query with the raw data and the original text strings back in instead of the numbers. I was thinking doing something along the lines of a DLookup, but I can't seem to make that work in a query correctly. Apart from calling the same table and linking it over and over to the different fields in the original data table (see photo for how insane that is).

View 2 Replies View Related

General :: Search Fields From Table B And Populate Into Table A

Jul 23, 2013

I have a table called BID with the following fields

bidder, seller, iid, starttime, bidtime, and bidprice

bidder is an id number that is reference to uid of table USER

the USER table have the following fields,

uid, uname, city, and state

I created a BID form for the user to enter data into the BID table. What I am trying to do but is having trouble with is have the user search for their name that may already be store in the uname field in the user table, and what ever they choose base on their search, the uid of this uname gets store into the bidder field of the bid table.

I still have a second step where the user in the bid form can search the iid but shows the itemname from the item table, and the value of seller, iid, and starttime from the auction table gets populated into the bid table.

iid from the auction table is reference to the itemtype and the following fields exist in the itemtype table.

iid, itemname, description

View 14 Replies View Related

Tables :: Two Fields In A Table / Link To Same Lookup Table

Mar 14, 2013

I have a table "Product" and in this table I have two fields "StoragePlaceID1" and "StoragePlaceID2". Both these fields link to the look-up table "StoragePlace"

*Attached Image "Product_StoragePlace" from the Access Relationship Window"*

When I want to add a new Product from my inter face i get the error you can see in the Attached Image "Save_Error".I think the problem is that the Relationship is defined as One-to-Many,there a way to define the relationship as Zero-to-Many.

View 5 Replies View Related

Queries :: Update Table 1 Certain Fields Based On Table 2

Mar 9, 2015

I would like to achieve the following task described below:

Just for an example i have two tables = Table1 and Table2

Table1 contains following fields: ID , CusName, Price , Date_
Table2 Contains following fields: ID, CusName, Price, Date_

I would like to update Price and Date Field of Table 1 where Table 1 ID matching with Table 2 and Table 2 Date is maximum(most recent date).

View 4 Replies View Related







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