A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Running 2 queries



 
 
Thread Tools Display Modes
  #1  
Old January 9th, 2007, 05:17 PM posted to microsoft.public.access.queries
Pammy
external usenet poster
 
Posts: 181
Default Running 2 queries

I have created one complex query on our employees database and then another
query off of that one, it is very involved. My question: is there a way I
can set up a form that when a user clicks on a drop down example:
Balances (label) and in the drop down they would choose vacation, sick,
comp, etc and then in another box: Max days (label) they would type
whatever number and it would run from the 2 queries and bring me back
information.
Balances: comp (chosen from the drop down)
Max days: 20 (they type in)
It would bring back all the employees with comp and max days of 20 from the
two queries. Thanks,
  #2  
Old January 9th, 2007, 06:26 PM posted to microsoft.public.access.queries
Mackster66
external usenet poster
 
Posts: 63
Default Running 2 queries

There are a couple of different methods to accomplish this depending on how
comfortable you are with VBA. To do it without VBA, create a copy of the
query that is the control source for your form. Under the criteria block for
balances, enter...

Forms![YourInputFormName]![BalancesFieldName]

Under the criteria block for Max Days, enter...

=Forms![YourInputFormName]![MaxDaysFieldName]

Replace the terms 'YourInputFormName', 'BalancesFieldName', and
'MaxDaysFieldName' with the actual name of the form and fields. Create a
form to display the results (it can be a copy of your input form) and set its
control source to the new query. On the input form, add a command button to
open the new form.

--
I''m not young enough to know everything.


"Pammy" wrote:

I have created one complex query on our employees database and then another
query off of that one, it is very involved. My question: is there a way I
can set up a form that when a user clicks on a drop down example:
Balances (label) and in the drop down they would choose vacation, sick,
comp, etc and then in another box: Max days (label) they would type
whatever number and it would run from the 2 queries and bring me back
information.
Balances: comp (chosen from the drop down)
Max days: 20 (they type in)
It would bring back all the employees with comp and max days of 20 from the
two queries. Thanks,

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:22 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.