Reports programming

  • Thread starter Thread starter Irina
  • Start date Start date
I

Irina

Is there a way to allow users select the fields that they want in a report
via a form check boxes or radio buttons?
If this is possible, how would the code look like, and where would the code
go under - on Open? and what properties would this involve?
I am not good in VB at all and that is the reason why I am contacting
you guys - the experts!!!! :)

please help
 
you might try putting all the fields on the report

and then in the 'OnFormat' event control a field's visibile state dependent
on the fields in the Form

rough test it with just one....not sure if the Form has check boxes or radio
buttons or text buttons or what.... depending on your version you might have
to research the value representing the control...

If Forms!FormName.CheckBox=Yes then
me.ReportField.Visible=True
End If

Could be very burdensome and crude if there are lots of fields to
control....possibly you can cluster/group them into separate subReports and
make the entire subReport visible or not.....

very sloppy advice...sorry.....
 
Not exactly what you are asking for, but you might take a look at

The demo available at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane.
DH Query By Form

You can add the
functionality to any application by
-importing several forms and 2 tables into your app
-creating one or more "master" queries with names like
<Employee Work>
<Clients>
All query/reports are saved in the two tables. Results of the queries are
displayed in a datasheet subform on a main form with option buttons to send
to print, Word Table, text file, csv file, Excel, Html...

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
thank you very much I will give that a try

NetworkTrade said:
you might try putting all the fields on the report

and then in the 'OnFormat' event control a field's visibile state dependent
on the fields in the Form

rough test it with just one....not sure if the Form has check boxes or radio
buttons or text buttons or what.... depending on your version you might have
to research the value representing the control...

If Forms!FormName.CheckBox=Yes then
me.ReportField.Visible=True
End If

Could be very burdensome and crude if there are lots of fields to
control....possibly you can cluster/group them into separate subReports and
make the entire subReport visible or not.....

very sloppy advice...sorry.....
 
Back
Top