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

Need help with the IsVisible Property

Status
Not open for further replies.

mvital

Technical User
Jul 2, 2003
128
US
I have a dialog form. I have the list of the fields (columns) in a simple multi-select list box. The user can
choose one to all of the fields to display.

The report is modified in print preview based on the user selections in the dialog form. The user can see all the fields in print preview. The first selection the user would have is to choose to "undisplay" the columns he/she does not need on the report. Then based on his/her
selections he/she would then select to filter the results by let's say employee, analyte, location etc.


I just can't put the code together so that when the user makes the field list selections he/she does not want displayed for them to not be visible in the report preview. Should I start with a blank report and then have the first choice be to have the user select the fields they do want?

I may just be over thinking it. I'm am new to coding.

Thanks for your help.


 
include ALL fields on report.
scroll thru the list boxes, selected items.
make visible accordingly.

Dim x as integer, blnSelected as Boolean

For x = 0 to lstBox.Count -1
blnSelected = lstBox.Selected(x)
Me(lstBox.Selected(x)).Visible = blnSelected
Next x
 
Thanks Zion7! I entered this code in the on click event of the list box. I do not get an error, but I can still see all the fields. Should I have put the code somewhere else?

thanks for all your help so far! :) I really do appreciate it.

 
let's see your code.
it was just a guidline.
you may need to open report in design view first.
then make reference to it.
make sure the vbound column of your listbox, has the control name.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top