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  

One prompt for Four Queries



 
 
Thread Tools Display Modes
  #1  
Old January 6th, 2010, 08:46 PM posted to microsoft.public.access.queries
Wendelin
external usenet poster
 
Posts: 3
Default One prompt for Four Queries

I have four queries that are used as subreports in a summary report.

All four queries use the same prompt (for the same field): [Enter Patient
Contact ID]

How do I get only one prompt so that the keyed in patient contact id is used
for all four queries?
  #2  
Old January 6th, 2010, 08:55 PM posted to microsoft.public.access.queries
xps35
external usenet poster
 
Posts: 22
Default One prompt for Four Queries

=?Utf-8?B?V2VuZGVsaW4=?= wrote:


I have four queries that are used as subreports in a summary report.

All four queries use the same prompt (for the same field): [Enter Patient
Contact ID]

How do I get only one prompt so that the keyed in patient contact id is used
for all four queries?


Make a form with a field or combobox to enter the ContactID.
Refer to the field in the criteria section of the queries like this:
=forms!FormName!FieldName

Add a button to the form to open the report.

--
Groeten,

Peter
http://access.xps350.com
http://foto.xps350.com

  #3  
Old January 6th, 2010, 09:11 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default One prompt for Four Queries

Enter it in a text box in a form.

In the criteria of the queries put something like this:

[Forms]![FormName]![TextBoxName]

You could put a command button on the form to run a macro that runs the
queries.

The form must stay open for this to work; however, it can be minimized or
invisible.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Wendelin" wrote:

I have four queries that are used as subreports in a summary report.

All four queries use the same prompt (for the same field): [Enter Patient
Contact ID]

How do I get only one prompt so that the keyed in patient contact id is used
for all four queries?

  #4  
Old January 6th, 2010, 09:15 PM posted to microsoft.public.access.queries
SteveD
external usenet poster
 
Posts: 14
Default One prompt for Four Queries

One way is to have the queries reference a field(s) on a form. The visible
property of this field may be either true or false pending if you want it
displayed or not.

You can also do this if your query/report contains multiple criteria
elements, for example: FiscalYear, Division, Dept, etc.

In the criteria it would look something like
[forms]![frm_ReportMenu]![FiscalYear]

Give it a try,

SteveD



"Wendelin" wrote:

I have four queries that are used as subreports in a summary report.

All four queries use the same prompt (for the same field): [Enter Patient
Contact ID]

How do I get only one prompt so that the keyed in patient contact id is used
for all four queries?

 




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 10:15 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.