Refresh Query Results

Mar 2, 2005

This is probably a simple one for somebody:

I have a query based off of parameters on a form. A command button on the form then runs the query.

I would like to be able to change the parameters on the form and re-run the query without having to close the query.

Possible?

Thanks!

Also, I am not that good with code and will need fairly detailed instructions...

View Replies


ADVERTISEMENT

Refresh Query

Oct 9, 2006

I have a form linked to two talbles:

tblData
MaterialID (Autonumber)
MateialCode (Manually entered catalogue number)

tblBarcodes
Barcode ID
Barcode

The barcode ID is basically a list 1,2,3,4,5 etc against a list of usable barcodes and the idea is in my form frmEntry I will add a new Mateial, this inturn generate an autonumber, this shows on the form ok, and this in turn is linked to the BarcodeID to return a usable barcode for my new Material.

Problem was this doesnt happen when I add a new product. If I use the form to look back at previous entries it works fine, it's only the current record that doesn't automatically update.

Is there a simple way to refresh the form?

many thanks

View 2 Replies View Related

Refresh A Query In A Subform

Nov 29, 2006

I have a frmCustomer as a main form with a subformOrders as a sub form.
I now want to add another subform that is based on a query I build. I only want that subform to refresh (update totals) when data is entered in the subformOrders fields. I am trying to use the TimeInterval, I created a macro that just Requery. But soon as I click in the subFormOrders field, It starts to do the refresh.

Any Idea's

View 2 Replies View Related

Using VBA To Set Criteria In A Query And Refresh A Corresponding Subform

Dec 20, 2007

I have a Main Form, "frmBuildingSearch", which has a subform "frmBuildingSearchSub". frmBuildingSearch has a couple of input text boxes & 1 command button: txtCity, txtSite, txtBuilding, cmdSearch.
I want the command button to refresh my subform (which is run from a query, "qryBuildingSearch") based upon the text that is in the text boxes.

If there is any value in txtCity, then I would like to set the criteria of my City field in the query to:
Like "*" & [Forms]![frmBuildingInfo]![txtCity] & "*"

The same would go for any value in txtSite and txtBuilding.

I would like to use VBA to do this.

View 2 Replies View Related

Forms :: Refresh Form After Update Query

Sep 28, 2014

I have a form that has a check box on it. For some reason the check box is not being checked when an update query is run prior to load. I issued the 'Me.Requery' command after the update query is run (via 'On Load' and 'On Open' in the 'Event' property . . . neither worked) of the form. Is this the correct way to refresh a form after an update query is run ?

View 8 Replies View Related

Queries :: Refresh Values In A Form According To A Query

Oct 16, 2013

I have a form that has a dropbox list and I want the values of the form to change according to the value in the dropbox.For example:

When the dropbox contains the value A,
The form would display x=1, y=2, z=3.

When the dropbox contains the value B,
The form would display x=4, y=5, z=6.

I managed to create a query that opens the QUERY's results according to the value in the dropbox but I can't managed to run the query in the form, return the values according to the query and display them in the form.

I searched the internet and found many options including the Dcount command but I don't think it fits my case..I know I have to write something in the AfterUpdate field of the dropbox but I just can't figure out what it is...

View 8 Replies View Related

Modules & VBA :: Refresh Query NOT Linked To Form Or Report

Oct 14, 2013

I am making a booking system where a user enters

StartDate, EndDate (Form Header)
House , Room , UserID (Form Footer)

The Header and footer are not linked. The Footer simply displays all the existing bookings for said ouse/Room/Date combination. (Date being all dates between the StartDate and EndDate) BUT (surprise, surprise)users don't look at this to check if a booking already exists.

Also - It seems pointless to have the users enter the same data (House, Room, UserID) in 6 times (one for each day that they want to book the room.

So I am trying to automate the process.

Therefore, I append each 'new' record (that the users adds in this session) into a temporary table. (House / Room / UserID / StartDate)....note, no end date because I need a separate record for each day.

I have a query that is supposed to check the EXISTING bookings with the temp table.
My code (paraphrased here for simplicty) says

do while StartDate < EndDate
- if Qry_CheckForClash returns 0 records then '(uses a dlookup)
- append from TEMP to BOOKINGS.
- - else
- compile an alert message to the user (appending the Room No and Date each iteration)
- In Qry_CheckForClash, increase the StartDate by +1
- end if
loop

My problem is that after the last step (increase StartDate by +1) the call to Qry_CheckForClash still returns the initial StartDate. But when I check the TEMP table, the StartDate has changed.

So how do I REFRESH or REQUERY a query that is not associated to a form or report?

View 8 Replies View Related

Query Results Minus Query Results = New Query?

Apr 1, 2008

I used to queries ,1 to get items that are taken ( its all about sign in sign out for equipment) and other query is list of all items.
How can i make 3rd query which will give me all but taken items from query1?
(of course items from query 1 are in query2)
thx in advance

View 7 Replies View Related

Queries :: Join Results Of Unmatched Query With Matched Query To Include Null

Mar 24, 2013

I am trying to do the good 'ol sales report (query) to include customers with no sales.

I have a customers table, account number table, sales table & sales (line) detail table. (all linked in that order)

If I run a query to show customers (in the customer table) with account numbers, that works

An unmatched query to show customer without an account number works (but of course the unmatched account number field isn't shown).

How can I get the two two be shown together with the "unmatched" having a null or 0 for their account number?

I am guessing in principle, the resulting solution can be modified to show customers without sales alongside those with sales?

View 3 Replies View Related

Queries :: Update A Query Based On Results From Another Query Using Count Function

Apr 2, 2013

I run a physical therapy office and patients come in for treatment either 3, 4 or 5 times per week. My database is used to track these frequencies (among other things).

I have 3 queries which count how many patients come in 5, 4 and 3 times/week.

In my main table I have fields called "how many 5's", "how many 4's" and "how many 3's".

I have tried to design an update query which will update those fileds in my main table to reflect the counts in the 3 queries mentioned above.

(I'm not using SQL view, I'm using the query design view)

In the "update to:" row, I use the Build function and locate the count I'm looking for.

Problem: when I run the query I get the error: Operation must use an updateable query.

View 3 Replies View Related

Forms :: Refresh Pivot Chart In Subform After Changing The SQL Of The Subform's Query?

Sep 16, 2014

I have a form, a couple of comboboxes and text boxes on it. When these are filled out, the SQL of a query is changed using these parameters.

There are three subforms on the form, all pivot charts, all based on the query being changed.

The goal would be to update all three according to the user-given parameters.

Right now the subforms only update if I close and open the form, which is probably not the best solution, since it's too slow.

I've also tried to requery and refresh them, with no result.

Then I tried to overwrite the recordsource of the subforms with the same text that was originally there. This got them to refresh their data, but then all of the charts disappeared and had to be built again, so this is a no go too.

View 7 Replies View Related

Self Generating Query String Based On Query Results?

Jan 3, 2008

Here's my problem. I need to generate a report that says how much of each individual product was produced and as well as the total produced for a specified category in a time period. Something like the following:

05 Catagory A: 02 Product AA, 01 Product AB, 02 Product AC
10 Category B: 07 Product BA, 03 Product BB
04 Category C: 01 Product CA, 01 Product CB, 01 Product CC, 01 Product CD

etc...

I currently have a query that queries a database and pulls out all products that were produced in a specified period and the categories they belong to and dump them into a local access table. Now what I need to do is search through the query results and count up how many of each product were produced (02 AA, 01 AB, etc...) and the totals for each category. The number of categories is pretty limited (6), but there are hundreds of product codes, so I need a way to do this without having to type in each induvidual product code as the requirement by which the query searches. Also, the product codes that get returned are different every day.

I was thinking something along the lines of take the product code of the first row and check for any others in the results that match and write that into another table. Then move onto row 2 and use its product code as a search parameter and search through the query results for any matches. Then continue that until the end of the query results. Can I do that? Is there a better way to achieve what I need?

View 7 Replies View Related

Can't Get Query Result To "refresh" In Form Combobox

Mar 28, 2005

This should be fairly simple, but it is driving me nuts trying to get it to work right. I feel like I'm chasing my tail.

Anyway, I have a query with three fields: "PersonnelID", "QualificationID", and "QualificationStatus". This is a query off of my large table for tracking qualifications; however, I am using a form with three combo-boxes for the same information. The first two combo-boxes (personnelID and QualificationID) are used to filter the query. This gives the result of one and ONLY one row in the query. A unique personnelID number, a qualificationID number and the qualification status of the record in question. I WANT to be able to automatically retreive the last field (qualificationStatus) from the query and display in the form (and then save in my new table - I know, shouldn't save calculations and such).

I have it working somewhat. I can select the first two combo-box fields and then when I click the third combobox for qualificationstatus, I only have one item in the dropdown menu and then I select it. So far, so good, but this only works for the first record that I am working on. If I do another record without closing the form first, the combobox selection for qualificationstatus still shows the previous entry. However, if I switch the form to design mode and then back to form mode, the combobox shows the correct value. I just can't seem to get the form to refresh prior to selecting the third combobox. I have tried "DoCmd.RepaintObject" after update on the second box and on focus for the the third box, but it still doesn't work unless I switch the views back and forth.

Any suggestions would be ever so gratefully appreciated...

Brian :eek:

View 1 Replies View Related

Return Weekend Results On Monday, Yesterday's Results Otherwise

Nov 14, 2007

I am trying to filter a form to show the entire weekend's activity on Monday but only yesterday's activity Tuesday through Friday. Using this code I can return Friday's results on Monday and yesterday's for the rest. How do I get the range Friday to Sunday?

IIf(DatePart("w",Now())=2,Date()-3,Date()-1)

Using >Date()-3 doesn't work.

Thanks

Bruce

View 5 Replies View Related

Query Results In Form, But What If Query Is Null?

Aug 30, 2005

I have a query that displays results in a form, but if the query is null, I want to display a different form, or just an error message that says something like "your query returned no results" (right now it will display the form with no fields)

I am a beginning Access/VBA user and have searched and browsed the forum for combinations of null/query/form, but haven't found what I need. Can anyone point me in the right direction?

Thanks for any help.

View 5 Replies View Related

Query Results

Nov 30, 2005

I am wanting my query results to appear in my main form so that i can edit them, rather than a table the query is just a look up of my form that stores about 500 records and stores all the same fields

any help would be appreciated

thanks

View 1 Replies View Related

One Query W/many Different Results

May 21, 2007

Is there a way to write one query that will work for different criteria and is run by different buttons to produce bar graphs or a basic report depending on the button the user clicks??

View 5 Replies View Related

Query Results?

Jul 22, 2007

Hi all :o

I am working on a query but can manage to get it to do what I want.
I have a main table with a job_ID and a faults table which documents faults that occur related to that Job_ID the tables are related with a one to many relationship. I want the query to bring up all the jobs even those with no faults, at present it is only bring up those jobs that have faults, how do I include details of all the jobs and if there are no faults then that field is left blank, probably very simple to do but after working on this db for hours my brain is no longer functioning!! :eek:

Thanks

Jackie

View 2 Replies View Related

Help With Query Results

Jan 4, 2008

Hello all,

I have a table called tblODF and within that table, I have these fields:
- ODFNumber
- ODFScanDate
- Status (Combo box: Pending, Complete, Licensing)
- LastFollowup

In my query, I have the same fields, except I added a calculated field.
I added DayCount to

Codecalculate:(Date()-[ODFScanDate]

This should calculate the number we've had the ODF.

What I want to happen is, let's say the status is Maturity, I want the DayCount to say 0. If it's pending, I want it to calculate the actual days.

Is this possible?

Thanks

View 5 Replies View Related

Query Results

Nov 19, 2007

I've just started using Access 2007, but I've been an Access 2003 user for some years and have a couple of databases, both of which I've now brought over to 2007.

Something I've noticed and is probably very simple. In 2007, after I entered information in a table via one of my forms, I queried on that information but it wasn't included in the results. But everything else - from 2003 - was. I then went thru each field in the underlying table to "match" fields there were filled in for a 2003 record and now the new entry does appear in the query results.

This hadn't happened before in 2003 - it didn't matter if all or even particular fields were filled in. But now it needs for at least some particular fields to be filled in. Don't know if it's something different in 2007, or probably coincidental. I haven't changed anything in the table, query or entry form.

It's not a crisis (now that I see my results), but I'm wondering what is going on - now, that apparently wasn't occurring before?

Thanks!

View 1 Replies View Related

Email To Query Results

Dec 6, 2005

I hope I can explain this clearly. I'd be really grateful if anyone could help.

I need to set up some sort of contacts database at work.

I need (I think, after having a little think about it) one table, filled with people, (their names, contact details ect) and basically various queries to pull up people in certain groups. Say for instance, people who attend meeting a, b, c, (in a simplised, condensed version of the truth)

I did think about doing this with various tables actually. A contacts table, a meetings table, blah blah, but anyway. (Any advice on this incidentally would be great).

My main problem though. We often have to email all the people who attend say meeting a. We have contacts on our email systems, but they're different from person to person, and as the company is updating email systems, we can't even send contacts lists to everyone, as they're not compatible.

What I'd love is to be able to call up a list of people attending meeting a from my database and email each of those people (their contact details would include email address of course)

Does that make sense?

Is there any way of doing this?

I'd be really happy if anyone knew...

View 9 Replies View Related

Get Results From Query Into Table

Aug 30, 2005

This is a rael daft question, but how do I get the results of a query into a table?

View 5 Replies View Related

Query Results In ComboBox

Jun 6, 2005

:( I have such problem : my query works right, but in ComboBox I got results with wrong sort.
Query results is:
Street 8
Street 8a
Street 10
Street 10/12

But in ComboBox data views such:
Street 10/12
Street 10
Street 8a
Street 8

Please help me!

View 2 Replies View Related

Query Not Returning Results

Jun 23, 2005

Hi,

I have a query with two table's in them. One is filled, the other is still empty.
Both table's are related to each other with the field "document number".

This was working fine in access 2000, now in 2003 it returns zero results.
I am starting to think it is because one table is empty it returns nothing.
How can i adapt the query criteria or something else that it shows the results from table one, while table two can still be empty.
One table holds the documents and all information about it, the other holds the information wich document is referenced on wich document. Now since i can have documens which don't reference to a document, i still want those in the list.

Anybody any idea?

Thanks

View 1 Replies View Related

Different Query Results For Different Users (same DB)?

Jul 19, 2005

I know SQL, and I know databases, but this has me confrused.

I describe it in terms of macros, but I get the same results if I manually execute the queries.

A client has an Access DB that is used by the 5 employees in the office. He has a macro that creates an interim user list, then compares it the the user list from the start of the month.

If he runs the macro to create the interim user list from his computer (computer 1) then any computer can run the other macro and get the differences (about 200 rows).

If any other computer creates the interim user list, then any computer that runs the macro to calculate differences gets invalid results (>3000 rows).

A union of the 'good' interim user list and 'bad' interim user list shows about 3000 rows (out of 4345 rows in each original table), so the macro produces 1345 differenct rows, depending which computer it is on.

I verified that each computer is opening the correct database, and the query is a moderately simple INSERT INTO ... SELECT FROM query.

Does anyone know why this might happen, and/or an easy way to determine which rows are different, and why? It is Access 2003 with SP1, everyone has the same version.

View 1 Replies View Related

Showing Results From A Query

Aug 2, 2005

Does anyone know how to do a query so that the user can find all the things that will expiry at the end of the current month?
The user will click on a command button and it will show the results of a product that will expiry at the end of a current month.
Have tried with parameters to which the user manually types the end date in and then it will show the results but having problems.
Cheers

View 4 Replies View Related







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