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!

dynamic check boxes on forms

Status
Not open for further replies.

AdamP

Programmer
Feb 12, 2002
13
0
0
US
I am trying to create a form that will be linked to different tables based on user's input. The form will have different number of check boxes in it based on how many fields are in the table. Not sure where to start. Anybody have any ideas?
 
Not 100% sure of what u are looking for, but... I've created semi-dynamic reporting forms with several checkboxes and dropdown lists that are set to visible as needed. By doing this, I could have one report filter form for many reports.

htwh... Steve Medvid
"IT Consultant & Web Master"
 
Here's a fairly simple solution.

Using the Wizard create a form view for each table. Size each form so that in the normal view mode (not maximised and not minimised) all forms are the same size and not full screen.

Now create an unbound form with a header and no footer. In the header place a drop-list or an option group to select the desired table. I an assuming its only a handful of tables.

Use the Subform Wizard to add each of the table forms to the unbound form as subforms. Set the forms on top of each other and set the visible property of each to False.

You'll have to spend a bit of time tidying this up as the wizard will try to place the forms so they don't overlap.

In the after_update event of the drop-list or option group add code to:
1 make all forms invisible, and
2 then the selected form visible.

That's It.

Rod
 
Rod,

Unfortunately, there will not be a limited number of tables that the user can reference. I work at an auditing firm, and I am trying to create a tool that will analyze tables from our clients that we are auditing. I want to be able to have the user select a table to analyze, and then select the fields within the table to analyze. Then I have a procedure set up to run certain analysis on those selected fields. So the form needs to be very dynamic.
 
Use a list box or combo box, for your rowsourcetype you can use a very specific user defined function to list the tables in your database or the fields in a particular table. check out the help files for the entry "RowSourceType Property (User-Defined Function) — Code Argument Values". JHall
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top