method
Jun 30 2005, 12:36 PM
Hi guys . I created a form that has 3 combo boxes. Their name are Project
Number, year and weekno . It has also a button that on click action supposed
to generate a report based on my combo box criteria and then loads that report
for me. could any expert show me an example on how to do this. I have difficulty
finding an example in google since i did not exactly what is called this method
of generating report in access 2000.Thanks
narbspot
Jun 30 2005, 12:43 PM
Well it depends. What are you trying to have in your report. Is your report just going to show the text that is displayed in your combo box(proly not). If you are tyring to generate a report from information generated by you combo boxes you are going to have to design a query based what data you would like to see in your report vs. the text from the combo boxes. You might have to be a little more specific with you situation.
method
Jun 30 2005, 12:58 PM
ok suppose that i got the query . how i can connect the query to the combo box ?Thanks
narbspot
Jun 30 2005, 01:17 PM
you don't really connect a query to a combo box, unless you want a query to determine what goes inside of the combo box (what values) For this you would use the combo boxes row source property.
But what i think you are trying to do is to generate a report based on the information from the combo boxes.
So in your query you would do something like:
Select data1, data2, data3
From Table1
Where data1 = Forms!yourFormName!cbo1 AND data2 = Forms!yourFormName!cbo2 AND data3 = Forms!yourFormName!cbo3
This is just an outline, but after you get the query to generate the data you desire, you then create your report off of this query.
method
Jun 30 2005, 01:33 PM
Many thanks to u reply. Yes i want to generate a report based on information from teh combo box. In my report data i got like 15 fields! could u explain to me what is this query
:
[code]
Select data1, data2, data3
From Table1
[/code}
data1,data2, data 3 are which values ? and also what is table 1 ? Where should i put this query ?Thanks
narbspot
Jun 30 2005, 01:49 PM
Like i said this was just an outline of a query. As in my ex: data1... are the fields that you want to show in your report. So you must want to show 15 fields in you case.
If you don't know what a query is ill try my best to explain. A query uses SQL code to manipulate the data in you database into a custom view. You are making a report based on this custom view.(Im presuming)
Select - the fields you want
From - from the tables that the data comes from
Where - conditions on how you want your data compared
table1 - example table...name the tables however you want.
You make a query by selecting the queries option on the database window. Then create new query.
I mostly design a query in SQL view, but it might be easier to make your query in design view.
Consult the MS Access help or the Query forum on this site for more help.
Without actual data in front of me i don't think i can be of any more help.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.