Forms :: Performing Basic Math On A Specific Column / Row

Oct 10, 2014

how to do anything with it outside of tables and queries. I have been tasked with creating a form to do fairly basic things. Via tutorials I have managed to use the Expression Builder to do virtually everything I need except one thing.

I need to pull a value from row 2 in a specific column from a subform and subtract it from row 1 in the same column and subform leaving behind a + or - number for the user. Similarly, I need to do the same but subtracting the LAST ROW from row 1. If there is only one row at the time the operation is being performed, a value of No Data needs to be returned instead of a number.

View Replies


ADVERTISEMENT

Grabbing Time Values From Table In Visual Basic And Performing Calculations With Them

Nov 8, 2004

Hi,

My boss wants me to program in visual basic, instead of using queries, a calculation between times, which values are gotten from a table. How do I perform a calculation between two fields from a table in code and what functions are there to calculate the amount of difference in minutes between times in visual basic? THANK YOU SO MUCH IN ADVANCE!

G

View 3 Replies View Related

Forms :: How To Do Math With Two Different Units Of Measure

Oct 30, 2013

I have a table with some prices that are charged by the pound and some that are charged by each.

tblPrices
ID 1 - 1.00 per pound
ID 2 - 1.50 per pound
ID 3 - 2.00 per pound
ID 4 - 5.00 each
ID 5 - 7.00 each

My form is set up so that way I count how many containers I have and their weight, separately. I need ID 1 through 3 to do the math based on the pounds (essentially $1 per pound at 36 pounds) and ID 4 and 5 to do math based on how many of each are there ($5 each, and there are 3 of them).

View 14 Replies View Related

Database With Many Tables; Find A Specific Column

Mar 30, 2006

Hi well as the title says i have a database with a LOT of tables, and i need to find the tables that contain a certain heading, eg reference 6, is there an easy way of doing this?

View 1 Replies View Related

Forms :: How To Hyperlink From Query To Specific Record In A Specific Form

Jul 23, 2013

I want to hyperlink from a query direct to the relevant record in a specific form. I have a hyperlink field in the form which shows up in the query. When clicked in the query, this hyperlinks to the form but I cannot make it select the correct record in the form.How do I get it to select the correct record?

View 3 Replies View Related

Binding A Field To Specific Column In A Pull Down Manue

Feb 28, 2005

I created a a table with multiple columns. For example the table looks like as follows:

Table name - Observationcode
Code Value Description
CCH 1000 Heavy Crack
CCM 750 Medium Crack
CCL 500 Low Crack

I created fields on the subform - frmsubmain1
Field names are as follows:

Observation Code
Value
Description

I created combobox for a field called "observation code" so that the above mentioned table "observationcode" appear as a pull down menu to select from multiple lists. In the property section I bound the feild "Observation Code" to " column 1" to record the item in the column 1. I reapted this process for the fields "Value" but this time I bound the field to column 2 to show the value rate or value for the selected code. Again I reapeated this process for field name called "Description" but this time I bound the column to the column 3 to record the description for the corresponding code.

On the main form - frmmain

I created a field called Rate to calculate the total value in the subform "frmsubmain1" the validation rule looks like as follows:
=sum(Forms![frmsubmain1]![Value])

None of these seems like working except for the first one "Observation code". Observation code is looking into the right column and registering the right code but not the other two fields are not looking to the right columns, instead they are looking into the firts coloumn. I don't know why. Can anyone help me resolve these issues. I appreciate your help. Thanks.

Girma

View 7 Replies View Related

Queries :: Select Statement To Return Specific Data From Another Column?

Nov 3, 2014

I was just wondering if this is a possibility to do in one query or if it has to be run from a number of different queries.

I am currently developing a database from scratch for work (with very little Access experience).

The current query I am trying to run, if linked to a number of tables with different information.

What I am trying to do primarily is link stock to a specific "Host Name", "Serial Number" and "Part Description".

In the "Host Name" there is for example - A1-TX10-10001, B1-TX2-10004, C1-TX-10004 - The latter part of the name is a unique identifier number. The first part is the compartment in which the "stock" sits. So you may have all three components (A1-TX1, B1-TX2, C1-TX3) linked to the same unique identifier (10001 for example)

The serial numbers naturally are different for every single one and of course the srial numbers are linked to the "Part Description" - which will read something like....."C1-TX3 Transmitter", "B1-TX2 Combiner" etc.....

When I run the query like this the Host Name (which is also linked to the unique identifier on its own (10001) it returns everything under "A1-TX1-10001"

What I would ideally like to do is write a statement so that if the "Part Description" contains "A1-TX1" it will only return rows that contain "A1-TX1" in the Host Name and the same for "B1-TX2" and "C1-TX3" in the same query.

If "Host Name" contains "A1-TX1" to return "Part Description" to contain "A1-TX1"

View 10 Replies View Related

Math Help

Aug 21, 2006

I have an artwork book which I am cataloging. Each page of the book contains 24 pices of artwork.
What I need to do is display a page number to whatever record number I enter into the field.

Example 2: I enter any record number from 1140 and the field will display 48 for the page the artwork is on in the book.

Example 2: I enter any record number from 1153 and the field will display 49 for the page the artwork is on in the book.

Example 3: I enter any record number from 457 to 480 and the field will display 20 for the page the artwork is on in the book.

Thanks for any help I can get on this

View 11 Replies View Related

Best Way To Do The Math

Nov 10, 2004

I am a wiz at formulas in excel but am not sure yet how to make them work in access. I have a main form into which I put the date recieved of many items for each facility. Next to each of the dates I have entered I want to have a non inputable text block that will look at the date then do the necassary math automatically. Some of the formulas will also contain conditional statements based off of a date, type and rating. Can anyone suggest the best way to do this or point me toward a resource that explains how to use formulas in access. Here are a few examples of the formulas that are already in place in the excel version.

=IF(I28="Unsatisfactory",C28+60,(IF(F2="AA&E",C28+365,(IF(F2="Major Funds",C28+365,C28+1470)))))
in the above formula C28 is a date entered by the user, otherwise most formulas I need to input are simply (date + 1 year or date + 4 years)

Any advice would be greatly appreciated.

View 2 Replies View Related

Performing A Report

Sep 28, 2007

I have this table with this information...TABLE1code.............Name............Amount.....type'1000000'........'Name1'........... 0.00.....'N''1010000'........'Name2'........... 0.00.....'N''1010100'........'Name3'........... 10.00......'S''1010200'........'Name4'........... 5.00......'S''1010300'........'Name5'........... 0.00......'N''1010301'........'Name6'........... 1.00......'S''2000000'........'Name7'........... 0.00......'N''2010000'........'Name8'........... 0.00......'N''2010100'........'Name9'.......... 6.00......'S''2020000'........'Name10'......... 0.00......'N''2020100'........'Name11'.......... 3.00......'S'A need to create consult whose result show like this:RESULT'1000000'.....16.00'1010000'.....15.00'1010300'..... 1.00'2000000'......9.00'2020000'......3.00Could somebody help me this problem?. Thanks

View 3 Replies View Related

Some Basic Questions Regarding Forms

Oct 24, 2005

Hello, very basic user here.

I've created a form that has a text field that concatenates values using:
=![PREVOWN] & ![PARKNAME] & ![TRNSNUM]
I know concatenation is a big no-no with normal forms, however, the agency I work for, wants to use this concatenated value as their unique identifier. Using a query alone is not feasible as the database was set up to use this value as the primary key, so we need to include the value.

I am having two problems:

The first is that the field [TRNSNUM], is an incremental autonumber field. The values in this field need to start at 10,000 so I used a Format of "10"000.
This works great in the [TRNSNUM] field itself, but in the concatenated field, I am not seeing the first two digits, so my values for the last third of the concatenation are showing up 123, 124, ... instead of 10123, 10124. Any help on this issue? Also, is this just assigning the two digit field of 10 before my numbers? If so, I need a better way to do this, as my values will reach up to 11,000 and so on.

The next issue, and the larger problem is that my concatenated text field is not being input when I click on my forms, "submit" control button. I used the command button wizard to create this button. I selected "Record Operations" and then "Save record." It seems to save all of my other text field, except the concatenated field. This is a problem, since the value is supposed to be my primary key, so if I cannot obtain the value from my form, I cannot add more records, as the primary key cannot be null.

Any ideas would be of great help, I am a very beginning user, with very little knowledge of SQL or VB, so I am slogging my way through.
Thanks.

View 8 Replies View Related

Math Funtions

Jul 20, 2007

What the best way to perform math functions on data in a table? I have a form and a subdatasheet in it. I want to be able to: Average out data in cells. I.E One field will have a list of numbers and I want to be able to average those out.

The other is that i want to be able to check the previous cell(year) and see if the number has gone up or down?

Many Thanks :)

View 4 Replies View Related

Failed Math Can't Add

Dec 4, 2004

I have 6 fields that display a price based on a combo box selection
I can get one to subtract from another but not all add up
It should also be a running total so it updates as I pick more options

And how can you get the combo baxes to start out blank they all have
selects already made when I open the form


Thanks I'm fairly new to access

View 1 Replies View Related

Performing Calculations In Reports

Nov 13, 2005

I have a table customers and Purchases. Customer table has the {name, lastname, tele, address, city ..etc.} and the Purchases table has the {name, sku, unitprice, qty, cost}

Is there a way to create a report that shows the total amount of purchases made by customer?

Also is there a way to round up values in reports such that if the value is 3.95 it says 4.00?

please let me know if more info is required.

View 2 Replies View Related

Performing A Calculation On Two Fields

Dec 14, 2006

This is going to be a simple one for someone, but it is proving to be a pain for me. I have two collums in a table, one that is a value another is a quantity, i have another field that totals the two fields. This works fine and shows the total but it does not store the total into the database, how can i get it to do this.

In the Total field the control source is "=[Cost]*[Quantity]" i have tried to set it too TotalCost=[Cost]*[Quantity] but this gives me errors

Thanks for looking

View 3 Replies View Related

Forms :: List Boxes - Single Column Versus Multi Column

Apr 3, 2013

How do I select the first column of a multi-column list box (called "List1") for a query.

A single column list box works fine.

Code:

SELECT Tble_Employee.Emp_No, [forms]![attendee_form]![list1] AS SelectedCourse
FROM Tble_Employee;

View 6 Replies View Related

Performing A Match Query Between Two Tables

Oct 25, 2006

Hi,

I recently got a new job and am trying to learn access for it. I have two tables. Both of them have client id numbers. They are both supposed to have the same client id numbers. However, Table 1 has more client id numbers than Table 2. I want to do a match query that selects the client id numbers in Table 1 that do not have a corresponding match in Table 2. How would I go about doing this?

Also, I want to do a simple select query where I select the client id numbers in Table 1 whose first two numbers are "88." How would I do this in the query or SQL form.

Do you have any recommendations about the best way to learn Access for practical applications like this? I'll also need to get good at making Forms which seem fairly complicated.

Thank you for your time.

Rajiv

View 1 Replies View Related

Error In Performing Data Entry With SQL

Sep 3, 2015

now when I try the section performing data entry with SQL, I am at the point where I have typed the SQL statement:

INSERT INTO Employees(EmployeeNumber, [Last Name], Gender, HourlySalary)
VALUES ('227947','Jameson','M',18.85);

It chokes on the "unknown variable" HourlySalary, I could find nothing wrong with it.I then deleted my HourlySalary and copied theirs directly from the tutorial. It still chokes on HourlySalary.Now I am not sure what to do since I have taken their script and copied it to the SQL window.

View 4 Replies View Related

Query Math With Dates

Aug 18, 2006

I want to have a query that will subtract a Due Date from todays date and tell me how many days are left/passed in either a positive number or negative just like the DateDiff Function. how do i do this?

View 5 Replies View Related

Failed Math Update

Dec 5, 2004

Its in the control source of the text box I want the total stored in
=Forms![Estimate Maker]!Tank.column(2)+Deck.column(2)+[Internal Valve].column(2)


The data entry setting did the job thanks much

View 3 Replies View Related

Lost Data In One Field After Performing A Search

Aug 8, 2015

I have a form frmMember, it has a search button that performs a complex search of fields. after performing my search my [BaseDues] field shows #Name? BaseDues is set by a CBO in the field above.

It works correctly except after the search...

Here is the Code for the Search Button:

Private Sub cmdSearchForm_Click()
On Error GoTo Err_cmdSearchForm_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmSearch"

[Code] .....

View 9 Replies View Related

Math Operations On Values Question

May 13, 2005

I have created a table that holds the inventory information of some items i have in stock. What I want to do is this:

1.)When a customer orders something, i enter the quantity ordered and hit a process button. When this button is clicked it automatically reduces my inventory count to reflect the reduction

2.)When I receive shipments, i want to enter the information and hit process so that it automatically sets my inventory counts to reflect the addition of the new units

I am having trouble figuring out how to go about doing this. I was thinking of somehow setting up some textfields and then adding buttons that set fields accordingly.

Any help would be most appreciated.

View 14 Replies View Related

General :: Performing Multiple Database Action On Button

Jul 11, 2012

I am writing an application for my personal use. I have 2 Access databases, one contains the data tables and the other has the forms, queries, reports, etc.

So far, I have been able to use the queries in the Row Source property of my form objects to accomplish what I want to do. Now I want to have a button that appends records to a table, the data in the table comes from several different controls on my form. After doing this the button should requery another control to display the new records added.

The OnClick event for the button allows me to use a Macro builder, Expression builder or Code builder. If I choose to use DAO in VBA code to append the records, do I have to define the database to create a database object to use even though the database is already open? Can I use a Macro to do this? Can a macro reference the data that is in the controls on my form?

View 6 Replies View Related

Queries :: Performing Keyword Searches Of Text Field

Nov 16, 2014

I am trying to perform some keyword searches of a text field. My preferred option would be to hold all the keywords in a separate table and then use something like

SELECT * FROM Text Table, Keywords Table WHERE (((InStr[Text Table].[Text],[Keywords Table].[keywords])) > 0 ));

This works and returns anything which has the string from the keyword table, however I wanted to look for whole words only. I can do this in SQL using a regular expression along the lines of [!a-z] keyword [!a-z] which only finds the string where it has no letters directly either side of it.

What I would like to do is combine the two methods so I hold my keywords in a table and then use them with the reg ex to find whole words only.

View 6 Replies View Related

Dealing With Null Values In Math Expressions

May 11, 2006

Hi all,

I am in desperate need of some advice. Today I set to work building some math functions in my queries to calculate delays/turnaround times for work, etc.

I have found that where there are null values in my table - the calculation seems to break down.

Let me explain...

In it's simplest form (I have removed some fields and will deal with DATE only, not TIME which is a seperate field) I have the following -

Date_Received
Date_Started
Date_Pended
Date_Recommenced
Date_Completed

I have the following expressions in my query -

Turnaround: Date_Completed - Date_Received
TimePended: Date_Recommenced - Date_Pended
TimeInactive: Date_Started - Date_Received
Workrate: Turnaround - (TimePended + TimeInactive)

The query calculation will only work when all fields contain a value.

For instance, sometimes the work may be started, then completed. Skipping the 'Pended' and 'Recommenced' steps.

Can anyone tell me what I need to include in my maths for Access to treat a null value in the table as zero? Or any other approach.

Please help!!!!!

Thanks

Rob :eek:

View 3 Replies View Related

Help A Newbie Understand Simple Math Functions

Aug 6, 2006

I am completely new to Access but probably all I will need is a gentle push in the right direction. I'd like to think I'm fairly quick at learning new things. Thank you in advance, here's where I am, (first step anyway):

Table 01 Parts List
ID - name - cost

Table 02 Item List
ID - nick name - description

Table 03 Items to parts relationship (this is where I fall apart)
ID - Item ID (relationship to table 02) - Item nickname - PartID (relationship to Table 01) - Part name - Part quantity.

What I am trying to do:
I resell items in table 02 which are built of various parts from table 01. I need to generate a table that says:
Item 1 is built from 4 of part 1, 2 of part 2, 9 of part 3, and the total cost of parts for Item 1 is x. I want to update the parts list cost on a regular basis and have the item price change reflected.

If I can understand how to make this work, I can ultimately add in labor and overhead etc etc. Baby steps for now.

Thanks again
-Richard

PS
Here's a copy of my sad little db

http://www.biggsandsmith.com/temp/Trial-db2.mdb

View 4 Replies View Related







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