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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to print only selections in a form in ms access

Status
Not open for further replies.

1476jal

MIS
Jan 27, 2010
4
0
0
US
I need some help. I created a form with option buttons that the users are able to select. They can make multiple selections. I also created a report for the form. The issue is that at the moment, all of the option buttons selected or not print out on the report. How do I make it so that ONLY the options selected are the ones that come out on the report?

Your help will be greatly appreciated!
 
What are the option buttons and WHY do you think they should determine what gets printed on your report. Controls on your form have nothing to do with controls on your report unless you have done something that you are telling us about. We don't know if any of the controls are bound.

If you want some help, you need to provide significant information.

Duane
Hook'D on Access
MS Access MVP
 
The controls are unbound. I created the report based on a query that is then tied to the table. The report contains all of the fields that the table has. The data type of the fields are yes/no. The user that I created the database for needs to show the report to an outside vendor and therefore does not want them to see all of the options avaiable. Is there a way maybe from the query that I can display on the report only the options selected? Or maybe on the print button command that I can have a where condition?


I hope that the etra info helps. Please bare with me, I'm new to this.

Thanks
 
IMO, the table structure is wrong. It sounds like your options are fields when they should create records. What happens if your user needs to add more options? Do you want to add fields, controls, etc?

I could be wrong about the structure and would have a better idea if you described the structure and how the fields are used.

If you can't or won't change the structure, I would create a normalizing union query and use a subreport or similar to display only the selected options.

Duane
Hook'D on Access
MS Access MVP
 
The database is used for office visits. Medical coders need to select how their visit was. There are 4 forms that the user needs to go through and all have options buttons. At the end of the forms they want to be able to print only the options selected from those 4 forms so that they may show the results to outside vendors.
 
My opinion stands as stated. If you provide the structure(s), someone may be able to suggest a solution. The tables and report are significant while the form isn't.

Duane
Hook'D on Access
MS Access MVP
 
There is a "Display When" property for each of the components of a form. It can be set to "Screen Only", "Print Only", or "Always". You caould try using code to change this back and forth from "Always" to "Screen Only" based on when the option was selected.
So for example, if there is a button you click to select an Option, the click event for the button could contain something like:

Me![FieldName].DisplayWhen = Always

The default property setting would be Screen Only, so that only when the option was picked would it become visible on the print view.

Another way, since they are yes/no fields, is have the statements all part of the print button's code. Just have a list of the fields and for each one if it's value was no you'd set the visible property to no, (or the DisplayWhen property to ScreenOnly)

If Me![Field 1]= No then Me![Field 1].DisplayWhen = ScreenOnly
or
If Me![Field 1]= No then Me![Field 1].Visible = No

This is kind of an approximate solution because, but if you play around with it I think you can get it to work.
 
Display When is available on forms, not reports. I would never try to print a form in place of a report.

IMO, "all of the options available" should be in related records, not in yes/no fields.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top