Solved

Allow user to select fields in a form (at runtime) to see in Access 2010

Posted on 2012-03-19
4
339 Views
Last Modified: 2012-03-20
Hi

I am using Microsoft Access 2010 with vba running in the background.

I will be using a continuous form to present the data to the user.  I would like for the user to choose what fields to view at runtime.  I have ideas on how to do this,  but I would like some considered opinions.

Thanks
0
Comment
Question by:peispud
4 Comments
 
LVL 15

Accepted Solution

by:
Simon Ball earned 250 total points
Comment Utility
Listbox and select button.

listbox contains field names and multiselect mode on

when button pressed, use VBA to loop through listbox contents.  if selected, set field control to visible., if not, set field to invisible..
0
 
LVL 77

Assisted Solution

by:peter57r
peter57r earned 250 total points
Comment Utility
At a simple level, you can set the visible property to No for controls you don't want to see but in a continuous form you will still see the gap where the field would appear if it were visible.

If you are able to use form datasheet view instead then you can set each columns 'hidden' property in the Form_Open event procedure ,like...

Me.Fieldname.ColumnHidden = True
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
Do you really need a truly "Open Ended" system here...?

Most situations require 2 or 3 different combinations of fields, ...In this case you can simply create separate forms, and be done with this.

If this is a "Security" issue, then you will probably need something a lot stronger that simply "hiding" the Columns...
0
 
LVL 44

Expert Comment

by:GRayL
Comment Utility
peispud:  This question is now over 8 hours old and  you have been asked a few questions - may I request your answers?
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now