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  

Queries & Combo Box & Reports



 
 
Thread Tools Display Modes
  #1  
Old August 12th, 2004, 03:41 PM
Polina
external usenet poster
 
Posts: n/a
Default Queries & Combo Box & Reports

I have a table which feeds a query that has data for 5
locations. I need to create a query with a combo box that
asks the user to enter their desired location and other
aspects to return a report with only the locations they
want to look at. How can I do this. Thanks for any help.
  #2  
Old August 12th, 2004, 04:30 PM
fredg
external usenet poster
 
Posts: n/a
Default Queries & Combo Box & Reports

On Thu, 12 Aug 2004 07:41:02 -0700, Polina wrote:

I have a table which feeds a query that has data for 5
locations. I need to create a query with a combo box that
asks the user to enter their desired location and other
aspects to return a report with only the locations they
want to look at. How can I do this. Thanks for any help.


You can adapt this for your needs.

Create an unbound form.
Add a combo box.
Set the Row Source of the combo box to include the
CompanyID field and the Company Name.
Name the Combo Box 'FindCompany'.
Set it's Bound column to 1.
Set the Column Width property to 0";1"

Add a Command Button to the form.
Code the button's click event:

Me.Visible = False

Name this form 'ParamForm'.

In the Query (the Report's Record Source) [CompanyID] field criteria
line write:
forms!ParamForm!FindCompany

Next, code the report's Open event:
DoCmd.OpenForm "ParamForm", , , , , acDialog

Code the Report's Close event:
DoCmd.Close acForm, "ParamForm"

When ready to run the report, open the report.
The form will open and wait for the selection of the Company.
Click the command button and then report will run.
When the report closes, it will close the form.
You never see the query.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
  #3  
Old August 12th, 2004, 06:28 PM
Polina
external usenet poster
 
Posts: n/a
Default Queries & Combo Box & Reports


I thank you for your replay but if I already have a query
cant i creat a combo box which takes a feild in that
query and makes the user pick their location doing all
this with a comand botton? thank again
  #4  
Old August 12th, 2004, 08:04 PM
external usenet poster
 
Posts: n/a
Default Queries & Combo Box & Reports

Would it be possible to have a combo box that just lists
the 5 locations and does a small filter instead of
letting me choose from all entries in the query that
feeds the form.
 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Currency format doesn't 'take' in Queries and Reports alan General Discussion 4 August 11th, 2004 02:57 PM
Combo boxes and queries Phil Hood Using Forms 3 July 22nd, 2004 08:49 PM
Organizing Queries and Reports Jan General Discussion 2 June 21st, 2004 07:12 PM
Find Unused Forms, Queries, Reports, etc Ripper General Discussion 1 June 7th, 2004 07:02 AM
Creating Reports from Tables and Queries Moonman Setting Up & Running Reports 1 May 27th, 2004 03:32 PM


All times are GMT +1. The time now is 04:36 PM.


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