473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Using a query to control a report

Once again I must apologise for my lack of knowledge with access, although I am learning quickly!

I have a report which I want a query to control. The query will ask for someone’s name and then date of birth to pick out a particular person in the database.

I can do this fine.

However i want to be able to use drop down boxes to control the data input of both the name and DOB. What I have tried so far is to use a form for each, and have the data submitted to the query.. It of course didn't work.

Any help would be gratefully received!

Many thanks, Andy
Mar 12 '07 #1
5 1405
MMcCarthy
14,534 Expert Mod 8TB
Andy you just need one form for both combo boxes as they forms have to be open for the query to work.

Mary
Mar 12 '07 #2
Andy you just need one form for both combo boxes as they forms have to be open for the query to work.

Mary

thanks for that, the query works now, however i have come across another problem.

i dont know how to feed the information i have got in the query into my report.

Using the control box in the report i have set the query as the control source.. however when i open the report i get a parameter box with the criteria i have set in the query.. (forms!frmformname!etc.....)

any help would be great!
many thanks

andy
Mar 12 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
Andy,

Assuming your query is set up like ...
Expand|Select|Wrap|Line Numbers
  1. SELECT empID, empName
  2. FROM Employees
  3. WHERE empID=[Forms]![FormName]![ControlName]
  4.  
Then just set this as the Record Source of the report. You don't need to change the control source of any of the textboxes.

Mary
Mar 12 '07 #4
Andy,

Assuming your query is set up like ...
Expand|Select|Wrap|Line Numbers
  1. SELECT empID, empName
  2. FROM Employees
  3. WHERE empID=[Forms]![FormName]![ControlName]
  4.  
Then just set this as the Record Source of the report. You don't need to change the control source of any of the textboxes.

Mary
Thanks very much for that Mary,

Using your guidance I altered my code a little and used a macro to open the report once the query had ran. I'm not sure if it was the right way to do it but it seems to be working well!!

many thanks

andy
Mar 12 '07 #5
MMcCarthy
14,534 Expert Mod 8TB
You're welcome.
Mar 12 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Steve | last post by:
I have looked through the newsgroup for an answer to this but haven't been able to find anything resembling my situation. What I want to do is relatively simple, I think. I have a crosstab...
6
by: Megan | last post by:
Hi everybody- I'm trying to use a checkbox to control whether or not a date field in a query "Is Null" or "Is Not Null." I have 2 date fields: InDate and OutDate. If there is an OutDate, then...
9
by: Colin McGuire | last post by:
Hi, I have an report in Microsoft Access and it displays everything in the table. One column called "DECISION" in the table has either 1,2, or 3 in it. On my report it displays 1, 2, or 3. I want...
1
by: Chasing Gates | last post by:
I have created a database that brings in a new table weekly. I then made a separate query for each sales rep and a separate report for each rep. (The reports are all identical but call different...
2
by: Jason | last post by:
I am trying to create a simple database, but it's proving too complex for me!!! I have only just started a new database and am trying to have two fields in a table: the first holding the first...
2
by: amith.srinivas | last post by:
Hi all, From a word macro in VBA, I am trying to create a report in access DB. The report is based on a query with a parameter. I am using Set rpt = Application.CreateReport rpt.RecordSource =...
10
by: john | last post by:
I have a report to print envelopes. The report is based on a query. Now I need to make 10 more queries to make different selections of addresses. Every query has the same output fields as the...
6
by: Phil Stanton | last post by:
I am running a query that calls a function used to format addresses depending on the width of a control on a report that shows that address. The same query is used as the RecordSource of lots of...
2
by: Coll | last post by:
I have a form and a query. I would like to have some control on the form (check box probably), that when selected will limit the criteria for a field in a query. Here are the details.... When...
7
by: DeZZar | last post by:
Hi all, Unfortunately I am quite a novice with Access!! I've created a number of data bases for my work however becuase my skills are limited to really built in functionality and wizards my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.