Fields in a Report!

D

Deni Karan

Is it possiable to have a blank report and then let user decide wich fields
he wants to be displayed on the report. I have a table with 25 fields, I
never know wich fields user wants to see next to the usual name of the
company and the reg. number.
Is this possiable in access reports?
Thanks in advance!
 
M

Marshall Barton

Deni said:
Is it possiable to have a blank report and then let user decide wich fields
he wants to be displayed on the report. I have a table with 25 fields, I
never know wich fields user wants to see next to the usual name of the
company and the reg. number.
Is this possiable in access reports?


Yes, it is possible. It requies a mechanism for the users
to specify the fields they do want to see in the report.
Normally this woud be done using a form with a list box, a
bunch of check boxes or something.

The report design needs to have a sufficient number of
invisible text boxes in the detail section.

Then you would use VBA code in the report's Open event
procedure to interogate the form and make the needed text
boxes visible and set their position as appropriate.
 
D

Deni Karan

The first sugestion seems to meet the requirments of my needs, but is there
an example of how to do that with fields from the table.
 
D

Duane Hookom

You can set a list box to a row source type of Field List. Then set the list
box to multi select. Do you want someone to provide the code on how to check
the list box for the selected fields and then bind text boxes to these
fields from the query. There would probably be label captions that should be
updated and text boxes & labels made visible or invisible.

Is this the direction you want to go?
 
D

Deni Karan

Yes, that would be great if you have a code example of that, it is the way I
would go.
Thanks in advance
 
D

Duane Hookom

This would be a fair amount of coding and I don't have a sample. Marsh was
the poster who originally suggested this solution. Maybe he has code ;-)
Besides, he has more free-time than I do.

If Marsh doesn't come back, then you should parse your question into smaller
pieces that can be easily answered in a minute or so. Plus, I trust you
understand some of what you need to do without our help.
 
D

Deni Karan

Ok thanks, I will try with Marshall.

Duane Hookom said:
This would be a fair amount of coding and I don't have a sample. Marsh was
the poster who originally suggested this solution. Maybe he has code ;-)
Besides, he has more free-time than I do.

If Marsh doesn't come back, then you should parse your question into smaller
pieces that can be easily answered in a minute or so. Plus, I trust you
understand some of what you need to do without our help.

--
Duane Hookom
MS Access MVP


way
 
D

Duane Hookom

You really need to work at it a little and come back with specific
questions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top