Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report not giving info as I want it 1

Status
Not open for further replies.

VirtualWebgistics

Programmer
Sep 10, 2001
45
US
First, I am no Access guru ... and although I've learned the basics, I still have troubles most days.

I have an Access db I created, which has a table called 'Frequency', which has 'weekly', 'monthly', 'as needed', semi-annual', "annual" etc. in it. I have created a report which is sorted based on frequency, and used a combo drop-down box where the selection can be made.

However, now I am thinking I'd rather have the reports all print seperately, and am not sure how to achieve that. I'm not sure if I need to put each frequency (weekly, monthly, as needed, etc.) each in their own individual tables in order to do this, or if I need to know some coding to make this happen?

Basically in my Switchboard, I'd like for there to be buttons for "Print reports for weekly frequency", "Print reports for monthly frequency", "Print reports for semi-annual frequency", etc.

If anyone has a little time and could help me with this, it would be greatly appreciated.

Warmly, Jules
 
Fred, here I am. :) You probably felt lucky that I seemed to drop off the end of the earth. lol

I am going to read back through what has been written here and see if I understand what you're saying. Right now I have the thing so screwed up, it won't run because of those 'enter parameter' boxes popping up ... and since I haven't touched this since Friday, I have to get back into the mind set.

Thanks again for all your help! Jules
 
Let me know if it is still posted on your server - I will go out and fix it so it works.

Fred
 
Fred, if you have time to look at it again, here it is.


Even after reading back through all of this, I'm confused and don't know where to look for what I've done wrong.

Thanks bunches! Jules
 
Ok - I just looked @ your database - easy fix - in your frequencyquery and buildingquery you need to add all of the fields that are on your report. go into each query and add these fields to your query - they you will be ok -

I could not open the database from your server but I could save it - I have the file if you want me to email it to you - however, it is an easy fix.

Fred
 
Fred, do I have to add that [forms]![yourform]![yourcomboboxname] or [forms]![yourform]![yourcomboboxname] is null criterea to every field?

Thanks, Jules
 
Okay ... never mind ... it appears to be working now, without adding the criteria to all of them. I hope it is at least.

Now I have a question about how to create a new report based on if the box for "complete" is yes or no.

Do you want me to continue on here (and we'll go for the longest thread in history), or should I start a new thread?

Thank you so much for your help and patience!!

HUGz! Jules
 
Lets continue here - You can just add the criteria to your existing report...... Basically, add another field to your form and then in the queries - add the critieria just as you did with the others - the only tricky part would be to make sure your query cartures the right data - For example, you have the criteria in the building field as [forms]![switchboardtest]![cbobuilding] or [forms]![switchboardtest]![cbobuilding] is null

If you go back into the query you will notice that there is a seperate field based on the form and it says is null in the criteria....... When you add the new "complete" critieria to the query, make sure you capture all the options.

Hope that makes sense.

Fred
 
Fred, it doesn't make much sense to me, but that's because Access Speak is so foreign to me ... along with the fact that I get confused about where things are and what's driving what to make things work. That said, here's what I'd like to do, in full detail ... which will hopefully help you guide me, without me driving you nuts.

In the 'form' called "AllData" down near the bottom, there's a combo box called Complete, which has a yes/no drop down.

Monthly I want it to print a report of what work orders have not been completed to date.

What makes this complicated (at least to me) is that I'm not sure how to make that happen, since there's not criteria set to each "AllData" form filled out.

Each of the "AllData" forms will be printed out each month based on either their frequency or by building (which is what we've been working on, and as the guys complete them, they will come back to me, and I'll then enter them as complete.

Gawd ... now I'm confusing myself.

HUGz! Jules
 
What we have worked on is the reports not actually printing the forms - I would stick with the report format - You can use the same forms that you already have set up - I am guessing that in the table "alldata" there is a field called complete.

What you need to do is to add a field called "complete" to your form that contains the combo boxes for building and frequency. This is where you select which building you want - You are also going to select if you want to look at the complete field of yes, no or all - So it is no different than what we have done except that you are going to have two criteria for each report (building and complete) instead of just one (building) After you add the complete combo box to the form, you need to add the criteria to the query just like you did with building.

HTH

Fred
 
I am laughing at myself now. Okay, I think I get what you're saying, so how do I know the code for the yes/no criterea?

And I'm guessing the first step is for me to build the report, right?

BTW - is the code such as we speak of somewhere in the program ... or do you have to know Access Speak in order to know what code(s) to put in the criterea?

HUGz! Jules
 
You already have the report set up - we are going to use the same report that we already have set up... We are just going to add another criteria to it - You will just go into the queryies and add the new criteria along with adding the new combo box to the switchboard.

Hope that makes sense.

Fred
 
Well, the problem there is that I only need certain information in the Completed Report, such as Id#, Building, Category, Equipment & Completed.

I've already completed the form design, now I just have to know how to make the rest happen.

HUGz! Jules
 
Okay Fred, I am now to the point where I'm ready to make the query for the button on the report, but just need help with how to set the criteria so it runs with just a yes or no, based on the drop down chosen.

Thanks bunches! Jules
 
Do you have a field in your table that stores this field as a yes or a no? If so, you just need to add that field to the query and follow the same direction as we did with the other two criterias

Fred
 
>>Do you have a field in your table that stores this field as a yes or a no?<<

Yes.

>>you just need to add that field to the query and follow the same direction<<

That's where I don't understand Fred. Do I put the same exact criteria as we used on the others?

[forms]![switchboardtest]![cbocompleted] or [forms]![switchboardtest]![cbocompleted] is null

Is that right?

Thanks and HUGz! Jules
 
Fred, I thought I had worked through everything, but I'm unsure about one thing.

When we were doing the Building and Frequency queries, I had to add all of the fields to make it work.

However, when I am in the CompletedQuery, if I try and build the query from the table called Complete (which is where the yes/no choices are), when I'm in the query design, there's only one choice in the field area of the query, which is complete ... and there is no yes or no. Do I need to create two new tables called yes and no? Or, do I need to add two new fields in my AllData table called yes and no?

Thanks! Jules
 
You should be using the same queries that you had for frequency and for building - you are not creating a new querey ......

You should have the field "complete" in your AllData table -the queries that you already have set up are pulling data from AllData - you are just adding the complete field to those existing queries, inserting the criteria under the complete field that pulls from the switchboard and adding the new complete combo box to the switchboard.

Fred
 
Wow, I was off base there. I had created three queries called BuildingQuery, FrequencyQuery and CompletedQuery. Now I think I get what you're saying.

So let me make sure I understand.

I'll go into say my BuildingQuery which is from the AllData table, and then down under the field Complete, I'll put that [forms]![switchboardtest]![cbocompleted] or [forms]![switchboardtest]![cbocompleted] is null

Does that sound right?
 
Okay, I got rid of the extra queries and tied all the reports to the Query called FrequencyQuery. And, the Frequency combo box and button seem to be working right, only pulling the reports for the frequency that I select.

Same thing with the Building combo box, buttona nd reporting.

However, the Completed report is not working right ... no matter whether I select yes or no. Any ideas?

HUGz! Jules

 
Well ... I didn't change anything, and now the Building combo/button/report are doing the same as the Completed one. It pulls the report, but it's just a blank page. Wonder what's going on??

I'm going to step outside into the sun and fresh air and think about it. ;-)

Why would the Building one work once or twice and then stop working?? Hmmmm....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top