Disapearing Query Results!

Hello Dear

I have some Combo Box's on a form that extract data from queries
When queries run,the results show to the user that is not necessary!
Is it possible to hide query results from user?

Thanks 
Best Regards
0
Utf
2/27/2010 2:06:01 PM
access.queries 6343 articles. 1 followers. Follow

9 Replies
1141 Views

Similar Articles

[PageSpeed] 58

The question is unclear.

Do you want to show the results of a query in the form?

Are you seeing query results in data sheet view and don't want to?
If this is the case, then you must be executing the query in some manner and 
opening the query.  We cannot see your application and cannot see what you are 
doing.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

AMohamadi wrote:
> Hello Dear
> 
> I have some Combo Box's on a form that extract data from queries
> When queries run,the results show to the user that is not necessary!
> Is it possible to hide query results from user?
> 
> Thanks 
> Best Regards
0
John
2/28/2010 1:53:47 PM
Hello and Thanks
You are right! I'm seeing Query result in Data Sheet view but i don't want it!
About my program:In short,I want to simulating MS-Excel Filter in MS-Access 
and i need to run queries in the background of system so user doesn't need to 
see what is happening.It just needs final result!

best regards


"John Spencer" wrote:

> The question is unclear.
> 
> Do you want to show the results of a query in the form?
> 
> Are you seeing query results in data sheet view and don't want to?
> If this is the case, then you must be executing the query in some manner and 
> opening the query.  We cannot see your application and cannot see what you are 
> doing.
> 
> John Spencer
> Access MVP 2002-2005, 2007-2010
> The Hilltop Institute
> University of Maryland Baltimore County
> 
> AMohamadi wrote:
> > Hello Dear
> > 
> > I have some Combo Box's on a form that extract data from queries
> > When queries run,the results show to the user that is not necessary!
> > Is it possible to hide query results from user?
> > 
> > Thanks 
> > Best Regards
> .
> 
0
Utf
3/1/2010 6:13:01 AM
On Sun, 28 Feb 2010 22:13:01 -0800, AMohamadi
<AMohamadi@discussions.microsoft.com> wrote:

>Hello and Thanks
>You are right! I'm seeing Query result in Data Sheet view but i don't want it!
>About my program:In short,I want to simulating MS-Excel Filter in MS-Access 
>and i need to run queries in the background of system so user doesn't need to 
>see what is happening.It just needs final result!

If you just want the combo box to contain the results of the query, don't
*run* the query at all; instead, set the combo box's Rowsource property to the
SQL string.

-- 

             John W. Vinson [MVP]
0
John
3/1/2010 7:12:22 AM
Unfortunately i need queries result for tow purposes,One for combo boxes data 
source and another for next query as input!

Please pay attention: I have 5 queries and 5 combo boxes,The first combo box 
reads RowSource  data from a table and after it changes query no.1 runs and 
selects specific records from that table that are match in the special field 
with combo box no.1,in the next step combo box no.2 gets it's required data 
from query no.1 and after it changes,query no.2 runs and selects some records 
from query no.1 and so on...... until when query no.5 runs,Job is done and 
now at this time user must see final selected records and do some special 
works!

So i just need to see the results of query no.5!

Please help me
thanks Sooooooooo!

"John W. Vinson" wrote:

> On Sun, 28 Feb 2010 22:13:01 -0800, AMohamadi
> <AMohamadi@discussions.microsoft.com> wrote:
> 
> >Hello and Thanks
> >You are right! I'm seeing Query result in Data Sheet view but i don't want it!
> >About my program:In short,I want to simulating MS-Excel Filter in MS-Access 
> >and i need to run queries in the background of system so user doesn't need to 
> >see what is happening.It just needs final result!
> 
> If you just want the combo box to contain the results of the query, don't
> *run* the query at all; instead, set the combo box's Rowsource property to the
> SQL string.
> 
> -- 
> 
>              John W. Vinson [MVP]
> .
> 
0
Utf
3/2/2010 5:22:01 AM
On Mon, 1 Mar 2010 21:22:01 -0800, AMohamadi
<AMohamadi@discussions.microsoft.com> wrote:

>Unfortunately i need queries result for tow purposes,One for combo boxes data 
>source and another for next query as input!

There is still NO REASON to "run" the query and open a query datasheet.

The SQL of the second query can reference the name of the first query.

>Please pay attention: I have 5 queries and 5 combo boxes,The first combo box 
>reads RowSource  data from a table and after it changes query no.1 runs and 
>selects specific records from that table that are match in the special field 
>with combo box no.1,in the next step combo box no.2 gets it's required data 
>from query no.1 and after it changes,query no.2 runs and selects some records 
>from query no.1 and so on...... until when query no.5 runs,Job is done and 
>now at this time user must see final selected records and do some special 
>works!

That seems to be an extremely convoluted way of doing things but... ok; you
can set the second combo's rowsource in the AfterUpdate event of the first,
and so on.

>So i just need to see the results of query no.5!

Then that's the ONLY query that you need to actually open.

-- 

             John W. Vinson [MVP]
0
John
3/2/2010 6:15:43 AM
At last,No body could say me how to hide query's result Datasheet!

"John W. Vinson" wrote:

> On Mon, 1 Mar 2010 21:22:01 -0800, AMohamadi
> <AMohamadi@discussions.microsoft.com> wrote:
> 
> >Unfortunately i need queries result for tow purposes,One for combo boxes data 
> >source and another for next query as input!
> 
> There is still NO REASON to "run" the query and open a query datasheet.
> 
> The SQL of the second query can reference the name of the first query.
> 
> >Please pay attention: I have 5 queries and 5 combo boxes,The first combo box 
> >reads RowSource  data from a table and after it changes query no.1 runs and 
> >selects specific records from that table that are match in the special field 
> >with combo box no.1,in the next step combo box no.2 gets it's required data 
> >from query no.1 and after it changes,query no.2 runs and selects some records 
> >from query no.1 and so on...... until when query no.5 runs,Job is done and 
> >now at this time user must see final selected records and do some special 
> >works!
> 
> That seems to be an extremely convoluted way of doing things but... ok; you
> can set the second combo's rowsource in the AfterUpdate event of the first,
> and so on.
> 
> >So i just need to see the results of query no.5!
> 
> Then that's the ONLY query that you need to actually open.
> 
> -- 
> 
>              John W. Vinson [MVP]
> .
> 
0
Utf
3/2/2010 8:38:03 AM
On Tue, 2 Mar 2010 00:38:03 -0800, AMohamadi
<AMohamadi@discussions.microsoft.com> wrote:

>At last,No body could say me how to hide query's result Datasheet!
>

I did. 

Just DON'T RUN THE QUERY.

It is not necessary to run the query, and open the query datasheet, in order
to do what you are asking.

If you do run the query then you cannot hide the query datasheet.

Take your pick - create a query and open it, and look at the query datasheet;
or create a query, DON'T open it, and use it as the Rowsource of a combo box
(or any other of the many uses to which queries can be put).

You are causing your own problem.

-- 

             John W. Vinson [MVP]
0
John
3/2/2010 5:32:43 PM
Bravo
Thanks So
Until know i thought for using query results,It must first run and then...
But know i saw it works without opening!



"John W. Vinson" wrote:

> On Tue, 2 Mar 2010 00:38:03 -0800, AMohamadi
> <AMohamadi@discussions.microsoft.com> wrote:
> 
> >At last,No body could say me how to hide query's result Datasheet!
> >
> 
> I did. 
> 
> Just DON'T RUN THE QUERY.
> 
> It is not necessary to run the query, and open the query datasheet, in order
> to do what you are asking.
> 
> If you do run the query then you cannot hide the query datasheet.
> 
> Take your pick - create a query and open it, and look at the query datasheet;
> or create a query, DON'T open it, and use it as the Rowsource of a combo box
> (or any other of the many uses to which queries can be put).
> 
> You are causing your own problem.
> 
> -- 
> 
>              John W. Vinson [MVP]
> .
> 
0
Utf
3/3/2010 5:32:01 AM
On Tue, 2 Mar 2010 21:32:01 -0800, AMohamadi
<AMohamadi@discussions.microsoft.com> wrote:

>Bravo
>Thanks So
>Until know i thought for using query results,It must first run and then...
>But know i saw it works without opening!

<g> It is really counterintuitive! Your confusion was reasonable, and many
others (including myself, some time back) have been caught by it. 
-- 

             John W. Vinson [MVP]
0
John
3/3/2010 6:54:57 AM
Reply:

Similar Artilces:

running query
Hello, I was trying to create a chunk of code like follows: Dim qry As DAO.QueryDef 'the actual query to be generated Dim qryName As String 'the name given to the query sql = "SELECT * INTO AppendAllFields FROM [some table];" Set qry = db.CreateQueryDef(qryName, sql) DoCmd.OpenQuery (qryName) where qryname is alr. defined. When I wronf it, it kept giving me the error on the DoCmd line saying that runtime error 3001, invalid argument.... Anyone could help? Thanks! On 27 Apr 2007 11:09:43 -0700, azhu.uwaterloo@gmail.com wrote: >Hello, >I was trying to create a ch...

CrossTab Query that shows original data (text)
I am a scheduler and would like to build a pivot table in Excel or a Cross Tab Query in Access that shows the data in its original form (text) instead of calculating the count, sum, avg., etc. Row headings would have member’s names. Column headings would have times. Data items would be the name of the assignment. Any suggestions would be appreciated. Thanks. Jim G You can use a text field for the Value of a crosstab with FIRST or LAST or MIN or MAX. -- Duane Hookom Microsoft Access MVP If I have helped you, please help me by donating to UCP http://www.access.hookom.net/UCP/Default.h...

crosstab query question 01-26-08
I'm using A 2000. I've created a crosstab query that finds data based on a date range that I supply just before opening it. The query will add or remove columns depending on that date range, and it will label the top of the column with the appropriate dates.The query works perfectly. One of the fields in the query is a UserName. I want to be able to double click the Username, and have it open a form and go to that Username's record. Of course, queries don't have events like a form does. So I don't see any way to open my filtered form from a record in the query. If I base...

Query of External Data
I'm using a ODBC connection to query a oracle database. If I refresh a query and email the file to the intended recipients, I can limit what they can see by changing the query to include/exclude certaing markets. Is there a way that I can set up the query so the recipient cannot edit the query and have access to all the data...? Or is there a way to disconnect the query from the excel file, this way the query could never be refreshed to the database. We could email them the file daily, but they wouldn't be able to refresh or change the query(to view markets they normally ...

Stored Procedure pass through SQL Returned the following results:D
Hello, We are having an issue, after upgrading to SQL 2005 and GP Version 9. The error involves a few different stored procedures and happens very sporadically. Usually it will continue until the users logs out of Great Plains and gets back in. We have rebooted the SQL server a number of times. We get other stored procedure SQL pass through errors that includes pmPayablesSummaryInquiry, createSQLTmpTable, PopulateRMOpenTempTable and PopulatePMOpenTempTable. Again, these errors happen sporadically with no real pattern. The exact error usually reads "The stored procedure XXXXXX...

INSERT / UPDATE Query in same operation
Hi This is a backend database for .NET application Table1 is a linked table to a text file on the network, which is updated from an ERP system. Table2 is the table my application uses when the PC is offline. I want to update Table2 with Table1 on those rows who exist in both tables, and insert the new rows from Table1 into Table2, in the same SQL call. Is it possible at all? Regards JensB No. However you could put both queries in a macro or code and they would run so fast that you wouldn't know the difference. You could even Set Warnings off before the first quer...

ISV.config query
Hi, Im not a programmer and have limited experience with coding etc. However I wish to add a button to the account page/form via the isv config file. I want this button to get the website address of the company from the form and then use it to open the company website in a new window. Could anyone give me an indication of how to do this or even a sample bit of code...? This would be very helpful Thanks in advance Hi, The easiest way is probably for you to take a look in the isv.config file and just copy and paste. The test.gif and the url is just an example! Here is an example of...

Unable to bring back all results from table with query
For a uni assignment we have a designated query that we have to create. But when I run the query, I get one result returned to me. I should have two returned to me, as I have two records in the Problem table. The SQL is:- SELECT Problem.[Problem Number], User.[User ID], User.[User Name], User.[Job Title], User.Email, User.[Telephone No], Asset.[Asset Code No], Problem.[Problem Description], Problem.[Current Activity Log], Problem.[Solution Description] FROM [User] INNER JOIN ((Asset INNER JOIN Problem ON Asset.[Asset Code No] = Problem.[Asset Code No]) INNER JOIN [Contact Log]...

get value from a query /set a variable for a report
I put this question in the forms area -- it is a form/report problem. - don't mean to double post, but I should have put it in this area instead. sorry! hello, I have a report that shows the detail for 3 different values of a field named "TransType": (values: pmt, adj, act). The name, date, and TransType fields are set via a form. In the report, I want the detail to show for the chosen TransType(s), name, and date. AND I want a total of the "ADJ" records for the specified name and date to show in a field in the footer. strDocName = "Sales for 1 month&...

Creating a graph of top ten results
Im creating a database to monitor machine downtime on Access 2000. There are 168 different fault alarms that cause downtime incidents. I'm trying to create a report in a graph format that will only show the top ten fault alarms, ie, the ten fault alarms that occur the most. Thanks for the help. Tommy ...

Using external query (mdb) for dynamic date range
I'm trying to set up an Excel workbook with a dynamic link to an Access database containing quality data, involving dates. I want the workbook to always import data for the last 90 days. When I try to set this up using MS Query, to try to filter data I've tried several different variations where time is greater than or equal to: date()-30 today()-30 now()-30 And every time, it comes back as an error. It seems to be setting the query so that the entire statement is a date variable, eg "Syntax error in query expression '((Table1.Time>=#date()-30#))'...

Query data from same workbook
Hello all - I have an excel workbook that queries external data that is stored on a different workbook but same computer. It works fine and I haven't had any issues with it. But, now I need to make this workbook easy to send to other users. I would like to consolidate the data and put it on the same workbook with my written queries. I figured it would be easy to do, similar to doing a pivot table on sheet1, and the data source on sheet2. This would make it much easier to send out to all the users so it can find the "data source" every time regardless of who's computer ...

Change Connection of a Query
Hi I try to modify a Query, i want to change the server where the query is pointing to. How can I do that? JF need specifics, lots of ways to do it.... post current query connection string ie: code with current server address "Jean-Francois" wrote: > Hi I try to modify a Query, i want to change the server where the query is > pointing to. How can I do that? > > JF ...

Query to find outliers
I have two tables, one table listing names of people who did not receive a gift card and a second table of people who were taxed for the gift cards. Both tables use the name field ( I did not set up the tables but this field is first and last name) in common. I need to find out if there are people on the tax list who did not receive a gift card. So if a name is on the tax list it should not be on the did not receive list. Therefore, they were taxed for the card but never received it. ...

Sorting a query with a twist
I have a query I am trying to create based on another query (inventory) and a table. The inventory query shows the date, shift, Die set and the # of shifts remaining for each die set in inventory. The table has a corresponding date and shift field as well as two more fields that tell me what die set was left in the line at the end of the previous shift and what die set is staged to go in next (again left from the previous shift). When the inventory query is run it tells me what die set has the lowest inventory to the highest. However, the die set with the lowest inventory may not be the one ...

Pass through query giving an invalid column error
I am trying to write a pass through query using Access 2000. My source table has a field that has three blank spaces as a place holder. I do not want or need records that have three blanks in this field as well as records numbered 840. I am trying to write an SQL statement that will eliminate those records from my query. I am using the following code: select [table].[field] from [table] WHERE ((Not ( [table].[field] )= "840" or Not ( [table].[field] )=" ")); I get an error at line 3 invalid column name '840' and ' '. I can remove the quote...

GENERATE RANDOM NUMBERS TO FIT INTO RESULT OF PARTICULAR NUMBER
HI TO ALL, I NEED HELP WITH SOME PROBLEM...... what I need is to randomly generate numbers (each with different condition, some between 1 - 5, some between 10 - 20 ect) wich will fit at summary into particular number I want. example: 2 - 4 - 5 - numbers that will be randomly generated to fit into result 20 7 - 2 - - 20 this is number I put by myself into column any advice are willcome......pls I did some research but it seems to me that maybe I need to use visual basic for this wich i dont know. chozzecz Hi so you want to tell excel how many numbers you need and the value t...

Unmatched Query 01-08-08
I have an unmatched Query that should be returning a result but doesn't any help is appreciated. Thanks DS SELECT tblMenuSchedule.SchedTerminalID, tblMenuSchedule.SchedMenuID, tblMenuSchedule.SchedStartDay FROM tblMenuSchedule LEFT JOIN Days ON tblMenuSchedule.SchedStartDay = Days.DayID WHERE (((tblMenuSchedule.SchedTerminalID)=[forms]![frmMM]![TxtID]) AND ((tblMenuSchedule.SchedMenuID)=[Forms]![frmMM]![TxtMenuID]) AND ((Days.DayID) Is Null)); Perhaps more info! I have a list box that shows days of the week, basically I want that listbox to show the days of the week that are not...

Help w/Query
I am trying to build a query based on 2 tables. Main Table has Entry#, Date, Location, Product1, Amount1. Product Table has ProductID, Content, and Catagory. I am trying to add the Content and Catagory for the product that is selected in the main table. Because later on i need to sum up the amount of product in each catagory. So far i have an append query with the tables i need. I have a join between product1 and productID where all records from main table and only records from Product Table where those are equal. When i run the query i get product1 listed for every content and cat...

query two tables, changing font of changes?
Hi, I'm quite the novice, but is there a way to build a query to compare table a and table b and only return table a with the differences from b in red font? or something similar? (I am having to find the changes needed in a database by device sn, ex: location, ip address updates etc...) if I have two tables one being an extract from my db and one from all the new info, can i produce a "needed changes" query with red fonts representing the changes needed? I hope i wasn't too confusing.. Thanks! Michelle On Thu, 14 Jan 2010 16:45:01 -0800, michelle1...

VLOOKUP/HLOOKUP Query
Hope I can explain this clearly enough . I have c 50 branches of a retail outlet, each of which have a bank account that is used on a daily basis. The accounts are, however, cleared to a central account at the end of each month by way of an automatic transfer. I need to set-up a monitoring system so that I can track the cumulative balance at each outlet, even though some of this will no longer be showing on the respective bank accounts (after 31/1/10 - the first clearance date). I am advised each month of the amounts transferred to the central account and then have to do week...

Query wants parameter value
I have a tools database which been used for over 12 months on a network at work. Just lately I have noticed that on the main tools query, when I open it to do some filtering for locations or tools, I am asked for a parameter. If I just click ok, and not enter anything, the query runs. It didn't used to ask for a parameter, so I don't understand why it is doing so now. This query is used to select the different tool types from a combo box in the main form, so I don't want to change anything that would stop the selection working. The SQL for the said query is below:...

print query prompts in report header when no data to report
a report which uses a Query with prompts(expr1: xyz) and other criteria selects no records. The report header prints, but (expr1) which is a field in the header is blank. I want the prompts to print in the header even when no data is found. http://www.tek-tips.com/faqs.cfm?fid=6763 If you use references to controls on forms, the values will always be available even if the query returns no records. -- Duane Hookom Microsoft Access MVP If I have helped you, please help me by donating to UCP http://www.access.hookom.net/UCP/Default.htm "ConfusedCraig" wrote: > a report wh...

Workflow action working only on visible grid result set?
Hi, can anyone answer this question: On calling a context action (i.e. "workflow rule") on a query result set, does the action/workflow perform on the "visible set" (limited to 25, 50 or 100 records) or on all records that meet the search criteria? Thanks a lot! Achim Gounar Achim, If I am following your question, the "Apply Rule" action will apply the rule to the selected (highlihted) objects in the current view. Matt On Mon, 1 Mar 2004 09:15:41 +0100, "Achim Gounar" <[removethis]achim.gounar@orbis.de> wrote: Hi, can anyone answer this ...

CrossTab Query
I have two questions regarding setting up a new "small" Access 2007 database. First off, I'm new to designing databases, so I may not ask my questions using the correct terms. I do want to learn how to do this the right way, so please correct my terms so I can speak your language. Below is a sample of the data that will be used. The data consists of type, items, years, and amounts. The amounts values are "totals" as seen below, and are either number, percentage or currency. There can be some Null values, where the number is not known. Type Item ...