How To Find Result "Total" - Expressions?!

Nov 29, 2007

Hi. I have recently made a video database for a project, and have have come to a small problem. What I wanted to do was to, using a query search, find the total number of results found, in a form.

Basically, I have a query, in which I have the Film Name, Movie Cost e.t.c, with - Like ("*" & [Film Name], as the Expression (under Film Name).

When using the query, it retrieves results for what you have typed.

I use the query on a form "Film Search", which when clicked on Automatically brings up the Search Box. I also have another form "Films", which has a "Search Films" command button on it, run from a Macro. So basically everything works fine, but I when I search for a film, I want to have a text box, on the form, which has a count for the results.

For example, if I searched say "Shrek", and I got results for Shrek, Shrek 2and Shrek 3, the text box would say - " 3 results found".

This brings me to the conclusion of asking if I should do an expression, from the original query I am using, or to use Visual Basic, and more importantly - HOW?!?

Any help would be GREATLY appreciated, and I am sorry in advance if one, I have not explained my problem well enough, and two, this is in the wrong section.

Thanks in advance

Jk

View Replies


ADVERTISEMENT

How To Find Total Results - Expressions Or Visual?

Nov 29, 2007

Hi. I have recently made a video database for a project, and have have come to a small problem. What I wanted to do was to, using a query search, find the total number of results found, in a form.

Basically, I have a query, in which I have the Film Name, Movie Cost e.t.c, with - Like ("*" & [Film Name], as the Expression (under Film Name).

When using the query, it retrieves results for what you have typed.

I use the query on a form "Film Search", which when clicked on Automatically brings up the Search Box. I also have another form "Films", which has a "Search Films" command button on it, run from a Macro. So basically everything works fine, but I when I search for a film, I want to have a text box, on the form, which has a count for the results.

For example, if I searched say "Shrek", and I got results for Shrek, Shrek 2 and Shrek 3, the text box would say - " 3 results found".

This brings me to the conclusion of asking if I should do an expression, from the original query I am using, or to use Visual Basic, and more importantly - HOW?!?

Any help would be GREATLY appreciated, and I am sorry in advance if one, I have not explained my problem well enough, and two, this is in the wrong section.

Thanks in advance

Jk

View 2 Replies View Related

Sum Total Giving Interesting Result?

Oct 10, 2007

Ok baisically im doing a quick db for my company that is organising every file stored within the server and monitoring their last access'd, modified etc... I have a query which collates all the files which can be deleted on a server and file count is something alond the lines of 300K+ however i have also Sum'd the file sizes and instead of giving me some mental file size it has given me this result: 1.29659732507E+11

I mean i am no mathematician.. cant even spell it :S anyways im guessing that the number: 1.29659732507E+11 is actually 1.29659732507 to the power of 11?

Is there anyway i can get access to show the actual number i dnt care how long it is i just want a reliable, definitive result i can show my boss!

Cheers

View 1 Replies View Related

Queries :: Find Result In A Table Containing Highest Date Value - Too Many Results

Jul 6, 2013

Setup a query to find the result in a table containing the highest date value.

The query is linked to two tables : Payment information containing the date, and tenant information containing the tenant.

In the query i have selected the tenant name from the payment table (which is linked to the tenant name in the payment table) and the payment terms - ie weekly / monthly etc. I've then selected the payment date from the payments table.

The query should return for each tenant the latest date they paid.

On the pay date i selected the Max option.

But it shows me more than one record.

SQL query is shown here

SELECT Max(tblPayments.DateDue) AS MaxOfDateDue, tblLease.cboPaymentTerms, IIf([cboPaymentTerms]=2,DateAdd("ww",1,[DateDue]),IIf([cboPaymentTerms]=3,DateAdd("ww",2,[DateDue]),IIf([cboPaymentTerms]=4,DateAdd("ww",4,[DateDue]),IIf([cboPaymentTerms]=1,DateAdd("m",1,[DateDue]),"n/a")))) AS calcNextPayDueDate, tblPayments.cboTenant
FROM tblPayments INNER JOIN tblLease ON tblPayments.cboTenant = tblLease.cboTenant
GROUP BY tblLease.cboPaymentTerms, IIf([cboPaymentTerms]=2,DateAdd("ww",1,[DateDue]),IIf([cboPaymentTerms]=3,DateAdd("ww",2,[DateDue]),IIf([cboPaymentTerms]=4,DateAdd("ww",4,[DateDue]),IIf([cboPaymentTerms]=1,DateAdd("m",1,[DateDue]),"n/a")))), tblPayments.cboTenant;

View 2 Replies View Related

Find Total Marks & Display Pass / Fail

Oct 1, 2005

Please Help
I am new to this place
Developing Asp pages in Dreamweaver MX 6

In Access, 4 fields
ID( AutoNumber), A(Number), B(Number), Tot(Number), Result(Text)
After entering numbers in A & B, how to input total automatically
Can I set something in the Default Value in the properties of Tot
Like =A+B
Whats the code ?

Next, If the Tot > 25, I want to display "Fail" in Result otherwise "Pass"

Yours friend Anish from INDIA
vu3apq@hotmail.com

View 3 Replies View Related

General :: How To Find Out Total Quantity Sold Per Product

Mar 19, 2014

I've now populated my database with all my sales information.

Now, towards plan/prepare 'replenishments' from suppliers, I need to know how many of each product I've sold (ideally between two given dates ....because recent sales history is more important than say sales information from 1 year ago), but let's keep it simple!

How can I get such info out of my database, the info is contained in my database something like this...

Code:
Order date Qty Product ID

1-feb-2014 1 widget A
2-feb-2014 1 widget A
2-feb-2014 1 widget B
3-feb-2014 2 widget A
4-feb-2014 5 widget C

(in my database, qty is declared as 'double', where Product ID is categorized as 'text')

So I'd like an 'order summary' from the above raw data (contained in my database) to look something like this...

Code:
Widget A Sales = 4 units
Widget B Sales = 1 units
widget C Sales = 5 units

How can I do that please? (I looked at access reports, but couldn't see a way of multiplying 'product by quantity' & then total it all up).

View 12 Replies View Related

Queries :: Conditional Query To Post Result In Field And Filter Result Records?

Mar 5, 2014

I am working with Access 2010, on vista. What I have is a query made up of two tables, one product the other inventory. (see below) query.jpg

In the product table i have a field called "minimum reorder level". In the inventory table i have two fields one called "number in stock" and "number on order". What i want to happen is "number on order" to be filtered by the result, if the "number in stock", is less than "minimum reorder level", if it is, have the result placed in the "number on order" field. EG. if the "number in stock" = 2 and the "minimum reorder level" = 5 then 3 would be placed in the field "number on order" and only the second record from the query would be visible (see below) Query result.jpg The result of this would mean that the field "number on order" would be populated with the result and the and query would also use this to filter the record.

View 1 Replies View Related

General :: Adding Count To Result Of Query Depending On Month And Result

Aug 18, 2013

I want to add a number to my results within a query depending on the month and how many results. For example I have 10 results in my query 3 from January, 5 from March and the rest from April. The 3 from January would be 1,2,3. The five in March would be 1,2,3,4,5 and so on. Is it possible to do?

I'm using access 2003.

View 4 Replies View Related

Queries :: If There Is No Result In Query Need To Have Default Result Zero

Oct 12, 2013

I there is no result in query, I need the default result zero in my form field. I only use query wizard to create queries.

View 5 Replies View Related

Queries :: Self-Referencing Running Total Used To Calculate Next Total In A Query

Jul 23, 2015

I am trying to create a query that has a self referencing running total based on the values (point totals) of itself (running total of values in the running total column that have already been calculated for all previous records) plus the total of new points being added in the current record, less the total of points being removed in the current record. This running total can never go below 0, if it does, the running total should restart at zero and add in only new points and begin the process again with the next records

I am able to do this in Excel in less than two seconds so I know there has to be a way to port this into a query. I've attached an excel example of what I am exactly trying to do

If it takes multiple queries to complete the required output I am ok with it. In my previous outtakes I have had up to 8 queries but just couldn't seem to do it..

View 9 Replies View Related

Total Daily Sales Queries By Model/Total

Mar 8, 2008

Hi,

1) I am pretty newbie to this access programming, do forgive me if my questions sounds stupid.

2) Basically I create an application in access capturing or production information for my company. now the top management suddenly wanted whats their main concern:- Total Daily/Monthly, Quarterly, Annual Sales (By Model If possible)

3) I start with daily (Lets don't be too overly ambitious).

4) I try to let user select dates from my calender control and reflect daily sales (in Total & By Model break down) insert into my form.

5) Understand someone told me from my previous post in Calender control I can achieve it either through forms or queries, which is a better way. (in terms of flexibility to change for program maintenance/ scalibility) wise ?

PS: Please forgive my ignorance :o:(

Thanks (In advance) & God Bless.

View 2 Replies View Related

Expressions

Mar 4, 2008

I have a table that has questions that require Yes/No answers, simple done, however now for the tricky (or at least for me, VV new to Access) I need one of the fields to add up all the Yes and asign a value so for example:
Q1 Q2 Q3 Q4 Q5 Result
Y N Y Y N 3
How do I do this, I asume it is down to the expression for 'Field' Result but what should that expression be and where do I put it?

View 7 Replies View Related

Expressions

Jul 29, 2006

Help me what is wrong with this expression:eek: :

=IIF( [eBay Method] ="Auction",
IIF( [Start up Price] <=.99,.2,
IIF( [Start up Price] < = 9.99,.35,
IIF( [Start up Price] < =24.99,.6,
IIF( [Start up Price] < =49.99,1.2,
IIF( [Start up Price] < =199.99,2.4,
IIF( [Start up Price] < =499.99,3.6,
IIF( [Start up Price] >499.99,4.8," "
))))))),
IIF( [eBay Method] ="Buy it Now",
IIF( [Start up Price] <=9.99,.05,
IIF( [Start up Price] <=24.99,.1,
IIF( [Start up Price] <=49.99,.2,
IIF( [Start up Price] <=49.99,.25," "
))))))

View 4 Replies View Related

Unsafe Expressions

Jul 13, 2005

I'm using Windows 2K SP4 and have just installed Office 2003. Everytime I open Access I get a message asking if I want to block unsafe expressions (presumably macros). How can I turn this off?

BTW I've downloaded all of the security updates, which are recommended by MS.

View 7 Replies View Related

Unsafe Expressions...........??

Apr 5, 2007

Hi,

Can anyone tell me why it is that when i have written a DB on one machine using Access 2003 and then subsequently put that DB on to another machine i get an error relating to unsafe expressions?

why does this happen and is there a away in which can stop this error message from appearing?

I am trying to implement the DB i have written at work but it does not look good when i get a constant error message appearing when ever i open the DB.

Thank you in advace for your help

Regards
Bev

View 3 Replies View Related

Question Regarding Expressions

Feb 29, 2008

1)I have a list of stock opening prices and closing prices for March. i need an expression or function that will calculate which company's stock price changed most during the month (difference between opening and closing price). 2)In the stock table, I have dates given to me in the following format mm/dd/yyyy. Lets say I want it only to display the date so it only shows the month but not the year of the day. What function will give me this result?Thanks

View 1 Replies View Related

Questions About Possible Expressions

Jan 8, 2007

I have a complicated question here. I am currently building a db for career development in my workplace. The main fields that i am having some issues with is the following. I have three fields labelled as the following:

1)Last Review date

2)Next review date ( i have this entered in as an auto generated date-- will add one year from the last review date)

3)Status

Now here is my question:

I want my status field to auto generate as well-- say if the last review date was in 2005 and the next review date was dec.12/06-- then the status would currently be overdue.
Is there any expression to use to auto generate the status field to say whether it is overdue or completed? or is there any easier way to do this?

View 5 Replies View Related

Counts And Expressions

Jul 8, 2005

I’m starting to wonder how I ever made anything work, before I found this place.

I built 2 queries and put them in a query

They share a common field

The join type is all record from Query1 and Matching from Query2

Next I added a count field for each

Then I added a calculated field that subtracts the count from Query1 to Query2.

So far it all works

When I add >0 to the criteria for the calculated field a dialog box pops up asking for the values of the fields expressed the calculated field.

View 2 Replies View Related

Text Expressions

Jul 19, 2006

i have a master table with various lookup feilds. i want to create a querie that creates a text expression feild called description and it is based on the info provided in the lookup feild. problem is when i create this querie from the location master it provides the id's from the lookup colums and not their text.

any solution

View 4 Replies View Related

Help Need For Expressions Builder

Aug 1, 2006

Hi experts

I have some problems consists of using Conditions.
I have 4 tables in Access:
tbl1_School names, addresses, ID_Number etc..
tbl2_ School features with Number of Clesses, Number of Students, total Area etc.
tbl3_teaching stuff with names, occcupations, Ages ets. and
tbl4_nonteaching personal with names, occupations. ages, etc.

References is ID_Number of schools
I make Query with relations, but do know how to build Expressions Builder for this:
Question 1.
a)If school have between 300&500 Students there are ig.18 teachers,
b)if schools have between 500&800 Students there are ig.25 teachers and until 1500 Students there are ig. 50 teachers.
Question 2.
c)if school have area until 400 m^2 there are needed ig. 8 nonteaching personel,
d)if school have from 400 till 600 m^2 there are needed ig. 15 nonteaching personel.

Numbers I specified like examples ig. were prescribed bye regulation.

If someone want to help me how can I use Expression Builder or VBA Code it would be appreciated.

It means I should use Condition Commands.

Thank You for help.

View 6 Replies View Related

Using Expressions As Criteria

Jul 17, 2007

Is there anyway to use an if statemet to define the criteria for a query?

as in

if forms!RunReport!cboname <> "" then
query all names that equal forms!RunReport!cboname
end if

also is there any way to use a dlookup function (or another similar function)
to define several criteria for my query

ex.
i have a table, "modules", with a list of modules, each classified as "digital" or "analog" and i want to view all records containing analog modules from a different table, "info"

thanks for any help in advance

View 4 Replies View Related

Expressions In A Query

Feb 29, 2008

Hi all!

I'm new to this forum and could use some help on a simple Access app. I have attached the relations for the db. I need to collect some data to a subform as:
tblFunctionCodes.FunctionCode,
tblAccounts.AccountNumber,
Monday (hours),
Tuesday (hours),
Wednesday (Hours),
Thursday (hours),
Friday (hours),
Saturday (hours),
Sunday (hours)
Where I have the tblEmployees.EmployeeID, tblDates.DateWeek and tblDates.DateYear as variables.
The weekdays need to be an expression with my current design, which seems to work ok from Monday to Saturday, but when I throw in Sunday Access says the query is too complicated.

I have this query to get the data, but with no expressions (can't get it to work):

SELECT tblFunctionCodes.FunctionCode, tblAccounts.AccountNumber, tblRegistrations.Hours, tblDates.DateWeekDay
FROM tblFunctionCodes INNER JOIN (tblEmployees INNER JOIN (tblDates INNER JOIN (tblAccounts INNER JOIN tblRegistrations ON tblAccounts.AccountID=tblRegistrations.AccountID) ON tblDates.DateID=tblRegistrations.Date) ON tblEmployees.EmployeeID=tblRegistrations.EmployeeI D) ON tblFunctionCodes.FunctionCodeID=tblRegistrations.F unctionCodeID
WHERE (((tblRegistrations.EmployeeID)=[intEmployeeID]) AND ((tblDates.DateWeek)=[intWeek]) AND ((tblDates.DateYear)=[intYear]));


I've been trying to use that as a foundation for other queries but I just can't get it to work. Does any of your guys have any ideas? Maybe an INTERSECT query??

Anyway I'm out of ideas and very pressed to makes this work. Any ideas are welcome!

Thanks in advance, jon.

View 10 Replies View Related

Help With Expressions On Forms

Jul 6, 2005

Hi all, I'm writing a database basically as a favour to someone. I'm a sql analyst/programmer so my access and vba skills are a little limited and I hope someone can help me with a problem I have.

Part of one of my forms is a flow chart style set of Yes/No questions and the user answers each question. For each question I have created a (hidden) text box which calculates a score (5 for no, 10 for yes) which I have done with a IIF expression in the Control Source of the text box. These are then totalled to give an overall score.

This score is then used to calculate a grade (A or B) and a percentage score using the same IIF method in the control source.

What I want to do though, is use this grade and percentage and write it to the individual record as data in the table - to use in reports and such like.
Is there any way I can do this? I've tried a few bits of VBA but to no avail. Is there a way that this can be done? Or have I approached this in entirely the wrong way??!!? :confused:

Any help would be greatly appreciated!

View 2 Replies View Related

Expressions In Forms

Nov 24, 2005

Hi,

Is there a way on Access that when a total is calculated using an expression on a form that it could update the table itself with that total?

Thanks for any help!


Roly

View 1 Replies View Related

Using Switch Functions In Expressions.

Oct 10, 2005

i'm trying to use a switch function in a query but i'm unfamiliar with the format a bit. here is what i'm trying to do...

switch([Radios]![Warranty] and [Radios]![HousingWarranty]=true,[Radios]![Change front housing]*(25/60*28), [[Radios]![Warranty] And [Radios]![PortableHousingWarranty]=true], [Radios]![MaterialsUsedPrice1])

basically first statement is condition second is execution. I need to add more but i'm getting an error from this much...if I was doing this in vb.net I would just do if, ifelse, ifelse, ifelse...but...

Thanks,

View 2 Replies View Related

Unsafe Expressions A2K2

Jan 9, 2007

I have recently deployed an application at work [work pcs all running A2K2], built with A2K3 on home computer.

I split the database housing the backend on our server, named server, and using frontends on users pcs.

I am running a VB script that takes information from another linked db on server (so everything would be housed together and not on users pc) this script runs a query converts to xml, opens FTP and uploads the query along with .pdfs to the internet.

I can get it to work from home, no problem. I can get it to work from my pc at work.

But when I try on other pcs it can not find the db (error msg) or opened by another user in exclusive mode, yes I explored this option I dont think this it. 1) Cause the frontend can see the backend and everything works from there. 2) That pc is the only one with an open frontend. 3) When I try opening the actual db from the networked shared folder I get an unsafe expressions alert and can not open. The VB needs to open pull from the 2nd db. Both the backend and 2nd db I get this message.

Can anyone tell me how I can change this, the msg box says its out of trusted network. So I copied and actually opened on local pc, I could open it. Move it back to server and no such luck.

Thanks for any posts, I am having to get this working before I load for other branch offices.

I have googled and searched forum, seems everything is geared towards "sandbox".

View 4 Replies View Related







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