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 Replies


ADVERTISEMENT

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 5 Replies View Related

Queries :: Combine And Total Query Results

Aug 8, 2013

The results of my union query of 2 separate tables looks like:

Name - Count of Participations

Joe Blow - 7
Harry Smith - 11
Kate Upshaw - 8
Joe Blow - 3
Harry Smith - 5
Kate Upshaw - 13

I need to combine the duplicate names and total their participations to make a report look like:

Name - Count of Total Participations

Joe Blow - 10
Harry Smith - 16
Kate Upshaw - 21

View 3 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 :: Show Total Of Query Results With Percentage?

Apr 14, 2015

I've just made this query at work, it brings up the results from a database of telephone surveys. about going all gestapo on the table names and codes, I'm unsure as to how told off I could get for placing identifiable images on the internet

query.png

basically I would like to extend this query so it shows the sum of the "CountOfQ1 22" column and also shows what percentage of that total each entry in the "Q1 22" column is.

This will enable me to have results for the day sent to me at home every night at close of business as the person supervising the call centre at the time can run the query and email me the results.

View 4 Replies View Related

Modules & VBA :: Display Some Results In Subreport But Keep Grand Total Of Report Itself

Oct 25, 2013

How to display only the first few records in a subreport but keep the grand total of the report itself. When I limit results in query; it gives me the records but only totals for that set. I thought about putting code in the on format in detail section like:

Code:
If me.control.value >10 then
me.control.visible =false

but doesn't work.

View 4 Replies View Related

Queries :: Counting Total Number Of Returned Results From Query?

Aug 11, 2015

I'm trying to run a line of code after doing a Query Search that reports back the total number of results pulled from the search. I've dug around and found some useful code, but nothing that gives the results I'm needing. Most everything gives me the total number from the query. I'm also using a Split Form.

The process goes: Enter numeric search in Text10 and hit the search button to run the following macro: [studentID]=[Forms]![Query1]![Text10]

It then gives me the requested information.I have a second text box (Text19) that needs to display the number of pulled results. I've written VBA that only gives me the total number searched for studentID or for the entire Query.

Can I simply add an additional line to the Macro?

View 7 Replies View Related

Find Numerous Accounts (and Skip Through Results)

Jun 1, 2005

Put simply - when I do a find it displays the first account that matches it, then, when you leave the find screen and hit the "next record" key it simply displays the next account (i.e it no longer matches the search criteria).

So my question is,
How do I search records, then skip through ALL accounts that match the criteria.

example:
100 accounts in a database. 50 accounts are assigned "Mr A" and 50 "Mr B".
Mr A and Mr B sit down to work - hit find, and type in their name.
The form shows 1 account, and when mr A hits next fifty times it should not move on to mr Bs (possibly a "no more matches/records" message?).

I hope this is clear enough - and thanks in advance.

ps - I heard something about one form to search - and a subform to display results - the search criteria is static in form one, where as the subform can be skipped ("next record" pressed). But trust me - Im inexperianced :p and would need a nice newbie friendly description of such technological witchcraft.

View 1 Replies View Related

Step Back Through Previous Find Results

Jul 23, 2006

Hi
I have a set of membership records which have data input via a simple form. When looking for a particular record I use the standard Find menu item on the whole record set from the Form view, and move through the results using the Find Next button. Is there a way to move back through the records when I have got to the end of the results. eg. there may be numerous members with a surname Smith and I can move the the Smith records by using Find and Find Next but if I have moved past the record that I want is there a way of stepping back through the records?
Apologies if this is a really obvious question

View 4 Replies View Related

Queries :: Query To Find Results For Two People?

May 20, 2013

i have created a parameter query which will find a students best and worst time for each exercise they have done. so you enter the student ID when you run the query and it works fine but i have a problem i need to query to find two students in particular and then i have to create a report from this query on the two students identified and this is where i come up stuck. i have tried typing in both student id's into the criteria but this doesnt work no matter if i put and in it or not and im not sure how to get the job done.

View 7 Replies View Related

Forms :: Find Button - Message Box To Display No Results Found

Sep 26, 2013

I am not sure where to start or go about creating message box that would display "No results found" if my queries return no results. My search of the forums hasn't been fruitful.

I have created one form that has a text box and a button that works as a search function to run through the tables and displays the applicable queries. Currently, if no results are returned nothing happens. Preferably I would like a message box to display stating that there were "No results found". I would assume that the code would be associated with the "Find" button. Here is the VBA code as it stands, again, I haven't even attempted to add code for a message box.

Private Sub Find_Click()
On Error GoTo Find_Click_Err

If DCount("Heading", "Service Desk Manual Query") > 0 Then
DoCmd.OpenQuery "Service Desk Manual Query", acViewNormal, acReadOnly
End If

[Code] .....

Find_Click_Exit:
Exit Sub

Find_Click_Err:
MsgBox Error$
Resume Find_Click_Exit

View 7 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 And Replace Search Giving Either Ascending Or Descending Results

Dec 21, 2014

I have a DB and I have a button that triggers the find and replace. this will search over 100K entries and filter a specific client. The clients record can be 100's of entries.

This all works fine, but its always ascending and I have to scroll to the bottom for the latest record.

I can't set it to show Descending permanently as some employees can't cope with change. so...

I have a checkbox on my form for either Ascending or descending results. Is there any way I can get the find / replace to reference it, Or can I re-sort them after the search.

I've tried putting re-sort code on the 'find' button as lostfocus and mouseup but it doesn't work.

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

SQL Or Visual Queries

Oct 18, 2006

I hardly ever use SQL directly - occasionally when I need to update something, and when I need a union query, but generally I try to use stored queries with global functions for parameters, rather than form references.

The SQL examples in this forum look very complex to write, and therefore very easy to miscode.

Assuming that visual queries are available in a particular system, is there any benefit to writing SQL code directly - is it faster?

Thanks in anticipation

View 3 Replies View Related

Visual Basic

Feb 16, 2005

Hi,
Many thanks to those who helped with my last couple of problems.

I've allmost completed my project now and am debugging.

I've found that in order to close one of my forms, which has combo boxes on it, I need to have no values selected in those combo boxes. Could someone give me the visual basic script (or any alternative meathod) for resetting the combo boxes to their default values; i.e. nothing selected in them!

Many thanks,

Robin :o

View 3 Replies View Related

Access And Visual Fox Pro

Mar 17, 2007

I got a new job (another one, actually) and though it has absolutely nothing to do with databases, or computer work for that matter, I told my boss that I like building database apps with Access. He sparked up and said that he has a program in Visual Fox Pro, an application that's "more powerful" than access, but someone came in way back when and wrote a "program" that did some calculations to the existing DB, but the PC is dying and when it does, will take the addition with it. He said that he'd be interested in me looking into it and hopefully being able to replicate the work the prior person had done.

Has anyone worked with VFP and worked in Access with it? It doesn't seem very flexible at all and it's not very intuitive. I'm not impresses with it at all, but I have an opportunity here with my boss and would like to "get her done" so to speak.

Any help or links to good VFP tutorial sites would be greatly appreciated.

Thanks.

View 4 Replies View Related

Access To Visual Basic

Oct 12, 2005

Greetings to all the experts out there,

Here is something I wonder if it has already existed or been asked before, a program or an add-in feature that can compile an Access database (including forms, reports, tables...) to a stand-alone .exe application, just like Visual Basic does. The reason why I think it's doable is because in Access, we use VB codes anyway and it wouldn't need to be rocket-science for Access to do something like that or this would be an improvement for future versions.

There are plenty of advantages of going from an Access form to a stand-alone app, i.e. we wouldn't need codes to hide background and menu or status bar; we wouldn't need to disable mouse-scroll or prevent users to go back and accidentally delete past records; or we wouldn't need to worry about users seeing your terrific coding techniques and on and on.....Agree that all these can be done within Access but imagine how much time it'd save you from not doing all these things.

Thank you all in advance.

View 1 Replies View Related

Microsoft Visual Basic

Mar 18, 2008

I have a user running office 2007, with a program called Dev_Tracker wthat uses a front end of access 2000. This program allows a user to log in their project hours. The skinny is that when they lauch the program and try to make an entry they receive this error message:

Run-time error 3075

syntax error in date in query expression tbl_timesheet.weekof=#2.4.2008# AND tbl_timesheet.user=dworden.

If the user logs into another machine it works fine so it appeare to local to the machine. I have cleaned the registry and done other tweaks but no luck.:confused: Any ideas would be helpful.

View 6 Replies View Related

Access 2007, Visual.Net, ???

Apr 3, 2008

I'M NEW TO DATABASE PROGRAMMING AND HAVE LIMITED PROGRAMMING EXPERIENCE. SIMPLE EXPLANATIONS AND TERMINOLOGY ONLY PLEASE

I've been tasked with producing two database systems at work.

1) A job ledger (currently excel)
2) A stock condition survey database

Question

For future proofing:

* what coding should I be investigating (I expected to use Visual Basic, I understand this has now given way to Visual.NET?)
* Should be upgrading to Access 2007?
* Where the best place for sample databases of this kind?
* What's an SLQ system? Should I be using this instead?

All help appreciated

View 3 Replies View Related

Visual Feedback In A Combobox

Sep 13, 2005

I searched everywhere, but I think my ignorance of correct terminology is preventing me from finding the answer I need.

I have a form that holds two cascading list boxes. I want to be able to incorporate another list box that holds a record of which selection that was made, and how many per selection. The idea is to give user a visual feedback of what they selected, and be able to modify the selection.

I tried

Let Me.IDSelection.Value = Me.CategoryID.Value And Me.Specifics.Value

but the box stayed blank.... What am I doing wrong?

View 13 Replies View Related

Form Visual Issue...

Jan 17, 2006

Okay,

On a form with a subform, when viewed in "Form View" the form and the subform ALWAYS has this vertical bar on the left side with an triangle arrow pointing to the right.

What Is that?
Can I make it go away?


Thanks,
Jaeden "Sifo Dyas" al'Raec Ruiner

View 1 Replies View Related

Access And Visual Basic 6

Oct 17, 2004

hi... i have a form that display things in a table in access. when program the form to delete a query it deletes it but does not do rs.movenext
what i want to do is the form to display the next set of data from the database. i am using dao....
please help me!!

View 1 Replies View Related

Visual Basic Error

Mar 24, 2005

I'm getting the following error when I try and open my database: "The visual basic for applications project in the database is corrupt". I'm pretty sure I know the answer, restore from a back up. The only problem is that the sytem admin usually backs the file up every night and he has not gotten a valid backup for the past week. If any one has any ideas, besides restore, please let me know. You would save me a lot of extra work.

View 4 Replies View Related







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